diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index a1af01c87da..6916974beaa 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -114,6 +114,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_ARB_debug_output", ARB_DEBUG_OUTPUT }, {"GL_ARB_depth_buffer_float", ARB_DEPTH_BUFFER_FLOAT }, {"GL_ARB_depth_texture", ARB_DEPTH_TEXTURE }, + {"GL_ARB_derivative_control", ARB_DERIVATIVE_CONTROL }, {"GL_ARB_draw_buffers", ARB_DRAW_BUFFERS }, {"GL_ARB_draw_elements_base_vertex", ARB_DRAW_ELEMENTS_BASE_VERTEX }, {"GL_ARB_draw_instanced", ARB_DRAW_INSTANCED }, @@ -3557,6 +3558,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD {ARB_INTERNALFORMAT_QUERY2, MAKEDWORD_VERSION(4, 3)}, {ARB_TEXTURE_QUERY_LEVELS, MAKEDWORD_VERSION(4, 3)}, {ARB_TEXTURE_VIEW, MAKEDWORD_VERSION(4, 3)}, + + {ARB_DERIVATIVE_CONTROL, MAKEDWORD_VERSION(4, 5)}, }; struct wined3d_driver_info *driver_info = &adapter->driver_info; const char *gl_vendor_str, *gl_renderer_str, *gl_version_str; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 286e6eea153..d391cc18cba 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -5851,6 +5851,8 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context shader_addline(buffer, "%s\n", shader_glsl_get_version(gl_info, ®_maps->shader_version)); shader_glsl_enable_extensions(buffer, gl_info); + if (gl_info->supported[ARB_DERIVATIVE_CONTROL]) + shader_addline(buffer, "#extension GL_ARB_derivative_control : enable\n"); if (gl_info->supported[ARB_SHADER_TEXTURE_LOD]) shader_addline(buffer, "#extension GL_ARB_shader_texture_lod : enable\n"); /* The spec says that it doesn't have to be explicitly enabled, but the diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 828acf4726f..34bf88d5b6f 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -49,6 +49,7 @@ enum wined3d_gl_extension ARB_DEBUG_OUTPUT, ARB_DEPTH_BUFFER_FLOAT, ARB_DEPTH_TEXTURE, + ARB_DERIVATIVE_CONTROL, ARB_DRAW_BUFFERS, ARB_DRAW_ELEMENTS_BASE_VERTEX, ARB_DRAW_INSTANCED,