Commit 4f3d3900 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Prefer shader backends that support both vertex and fragment shaders…

wined3d: Prefer shader backends that support both vertex and fragment shaders over ones that support only either. Apparently there exist some configurations that support both ARB_vertex_program and ARB_vertex_shader, but only ARB_fragment_program and not ARB_fragment_shader. Note that this would change the selected backend for the Geforce 4 cards mentioned in the comment, but hopefully the mentioned GLSL bug is no longer a concern. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3de3e64e
......@@ -2504,18 +2504,12 @@ static const struct wined3d_shader_backend_ops *select_shader_backend(const stru
{
BOOL glsl = wined3d_settings.glslRequested && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 20);
if (glsl && gl_info->supported[ARB_FRAGMENT_SHADER])
if (glsl && gl_info->supported[ARB_VERTEX_SHADER] && gl_info->supported[ARB_FRAGMENT_SHADER])
return &glsl_shader_backend;
if (glsl && gl_info->supported[ARB_VERTEX_SHADER])
{
/* Geforce4 cards support GLSL but for vertex shaders only. Further
* its reported GLSL caps are wrong. This combined with the fact that
* GLSL won't offer more features or performance, use ARB shaders only
* on this card. */
if (gl_info->supported[NV_VERTEX_PROGRAM] && !gl_info->supported[NV_VERTEX_PROGRAM2])
return &arb_program_shader_backend;
if (gl_info->supported[ARB_VERTEX_PROGRAM] && gl_info->supported[ARB_FRAGMENT_PROGRAM])
return &arb_program_shader_backend;
if (glsl && (gl_info->supported[ARB_VERTEX_SHADER] || gl_info->supported[ARB_FRAGMENT_SHADER]))
return &glsl_shader_backend;
}
if (gl_info->supported[ARB_VERTEX_PROGRAM] || gl_info->supported[ARB_FRAGMENT_PROGRAM])
return &arb_program_shader_backend;
return &none_shader_backend;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment