=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Require ARB_derivative_control for SM5.

Alexandre Julliard julliard at winehq.org
Mon Jul 25 10:02:30 CDT 2016


Module: wine
Branch: master
Commit: fa42e3bb34f449c28e5bbd2d77bf5da5a534eb13
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fa42e3bb34f449c28e5bbd2d77bf5da5a534eb13

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Fri Jul 22 12:28:23 2016 +0200

wined3d: Require ARB_derivative_control for SM5.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/glsl_shader.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 72c6f8b..dba3460 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3564,18 +3564,11 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
 
 static void shader_glsl_derivative(const struct wined3d_shader_instruction *ins)
 {
-    const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
     struct wined3d_string_buffer *buffer = ins->ctx->buffer;
     struct glsl_src_param src_param;
     const char *instruction;
     DWORD write_mask;
 
-    if (!gl_info->supported[ARB_DERIVATIVE_CONTROL])
-    {
-        FIXME("OpenGL implementation does not support ARB_derivative_control.\n");
-        return;
-    }
-
     switch (ins->handler_idx)
     {
         case WINED3DSIH_DSX_COARSE: instruction = "dFdxCoarse"; break;
@@ -8576,7 +8569,8 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
      * (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])
+    if (gl_info->glsl_version >= MAKEDWORD_VERSION(4, 30) && gl_info->supported[WINED3D_GL_VERSION_4_3]
+            && gl_info->supported[ARB_DERIVATIVE_CONTROL])
         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]




More information about the wine-cvs mailing list