[Mesa-dev] [PATCH 1/2] glsl: always enable OES_standard_derivatives features if supported

Ian Romanick idr at freedesktop.org
Mon May 21 17:13:34 UTC 2018


On 05/16/2018 12:04 AM, Timothy Arceri wrote:
> The GLSL ES 1.0 spec made these features optional. With
> OES_standard_derivatives they are guaranteed to be available
> but currently the extension must be enabled to use them.
> 
> Instead this changes the code to check if the driver supports
> the extension and if so always enables them.
> 
> This fixes compiler errors in Google Earth VR.

This sounds like a bug in Google Earth VR.  Has anyone reported it to them?

> ---
>  src/compiler/glsl/builtin_functions.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
> index e1ee9943172..1ecbdc98404 100644
> --- a/src/compiler/glsl/builtin_functions.cpp
> +++ b/src/compiler/glsl/builtin_functions.cpp
> @@ -446,7 +446,7 @@ fs_oes_derivatives(const _mesa_glsl_parse_state *state)
>  {
>     return state->stage == MESA_SHADER_FRAGMENT &&
>            (state->is_version(110, 300) ||
> -           state->OES_standard_derivatives_enable);
> +           state->extensions->OES_standard_derivatives);
>  }
>  
>  static bool
> 



More information about the mesa-dev mailing list