Module: wine Branch: master Commit: 64d16294bf69913315fb0470ecaf44ffee76c933 URL: http://source.winehq.org/git/wine.git/?a=commit;h=64d16294bf69913315fb0470ec...
Author: Matteo Bruni mbruni@codeweavers.com Date: Wed Mar 16 00:24:11 2016 +0100
wined3d: Enable SM5 shaders in the GLSL backend, when possible.
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 | 8 +++++++- dlls/wined3d/wined3d_gl.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e484cc6..da66aac 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3588,6 +3588,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD 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_version >= MAKEDWORD_VERSION(4, 3)) + gl_info->supported[WINED3D_GL_VERSION_4_3] = TRUE;
if (gl_info->supported[APPLE_FENCE]) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 136bd55..92a5b1c 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8005,7 +8005,13 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s { UINT shader_model;
- if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50) && gl_info->supported[WINED3D_GL_VERSION_3_2] + /* FIXME: Check for the specific extensions required for SM5 support + * (ARB_compute_shader, ARB_tessellation_shader, ARB_gpu_shader5, ...) as + * soon as we introduce them, adjusting the GL / GLSL version checks + * accordingly. */ + if (gl_info->glsl_version >= MAKEDWORD_VERSION(4, 30) && gl_info->supported[WINED3D_GL_VERSION_4_3]) + shader_model = 5; + else 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 diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index a59c847..e344ff1 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -171,6 +171,7 @@ enum wined3d_gl_extension WINED3D_GL_LEGACY_CONTEXT, WINED3D_GL_VERSION_2_0, WINED3D_GL_VERSION_3_2, + WINED3D_GL_VERSION_4_3,
WINED3D_GL_EXT_COUNT, };