diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 5baf7d72fb1..4b57c0c6342 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -371,6 +371,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, #endif case PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD: + case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES: return pscreen->get_param(pscreen, PIPE_CAP_SM3); default: diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 59fa82b427f..01072581883 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -536,6 +536,8 @@ The integer capabilities: * ``PIPE_CAP_TGSI_DIV``: Whether opcode DIV is supported * ``PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD``: Whether texture lookups with explicit LOD is supported in the fragment shader. +* ``PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES``: True if the driver supports + derivatives in fragment shaders. .. _pipe_capf: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 8092fca4df1..1ce2d131195 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -889,6 +889,7 @@ enum pipe_cap PIPE_CAP_ATOMIC_FLOAT_MINMAX, PIPE_CAP_TGSI_DIV, PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD, + PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES, }; /** diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 3611cdcd5fd..3b771081592 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -776,7 +776,7 @@ void st_init_extensions(struct pipe_screen *screen, /* GL_NV_point_sprite is not supported by gallium because we don't * support the GL_POINT_SPRITE_R_MODE_NV option. */ - { o(OES_standard_derivatives), PIPE_CAP_SM3 }, + { o(OES_standard_derivatives), PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES }, { o(OES_texture_float_linear), PIPE_CAP_TEXTURE_FLOAT_LINEAR }, { o(OES_texture_half_float_linear), PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR }, { o(OES_texture_view), PIPE_CAP_SAMPLER_VIEW_TARGET },