Module: wine Branch: master Commit: 905261ab40dbf5e3be4664e210d6b3bfd2bb3dc5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=905261ab40dbf5e3be4664e210...
Author: Matteo Bruni mbruni@codeweavers.com Date: Thu Oct 29 15:09:53 2015 +0100
wined3d: Cleanup extension check for shader model 4 support.
This essentially enables shader model 4 support with Mesa or OS X when using core profile.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/directx.c | 2 ++ dlls/wined3d/glsl_shader.c | 6 ++---- dlls/wined3d/wined3d_gl.h | 1 + 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index d7f0512..046c6eb 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3553,6 +3553,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
if (gl_version >= MAKEDWORD_VERSION(2, 0)) gl_info->supported[WINED3D_GL_VERSION_2_0] = TRUE; + if (gl_version >= MAKEDWORD_VERSION(3, 2)) + gl_info->supported[WINED3D_GL_VERSION_3_2] = TRUE;
if (gl_info->supported[APPLE_FENCE]) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4a95e44..44e7090 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7761,10 +7761,8 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s { UINT shader_model;
- if (gl_info->supported[EXT_GPU_SHADER4] && gl_info->supported[ARB_SHADER_BIT_ENCODING] - && gl_info->supported[ARB_GEOMETRY_SHADER4] && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50) - && gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX] && gl_info->supported[ARB_DRAW_INSTANCED] - && gl_info->supported[ARB_TEXTURE_RG] && gl_info->supported[ARB_SAMPLER_OBJECTS]) + if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50) && gl_info->supported[WINED3D_GL_VERSION_3_2] + && gl_info->supported[ARB_SHADER_BIT_ENCODING] && gl_info->supported[ARB_SAMPLER_OBJECTS]) shader_model = 4; /* ARB_shader_texture_lod or EXT_gpu_shader4 is required for the SM3 * texldd and texldl instructions. */ diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 2be7262..437f62f 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -165,6 +165,7 @@ enum wined3d_gl_extension WINED3D_GL_NORMALIZED_TEXRECT, WINED3D_GL_LEGACY_CONTEXT, WINED3D_GL_VERSION_2_0, + WINED3D_GL_VERSION_3_2,
WINED3D_GL_EXT_COUNT, };