[Mesa-dev] [PATCH] st/mesa: relax requirements for ARB_ES3_compatibility

Timothy Arceri tarceri at itsqueeze.com
Thu May 31 23:46:08 UTC 2018


Seems about right.

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 01/06/18 05:24, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106748
> ---
>   src/mesa/state_tracker/st_extensions.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index bf73d506c17..467d9b07596 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -1197,25 +1197,28 @@ void st_init_extensions(struct pipe_screen *screen,
>         extensions->ARB_shader_viewport_layer_array = GL_TRUE;
>   
>      /* ARB_framebuffer_no_attachments */
>      if (screen->get_param(screen, PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT) &&
>          ((consts->MaxSamples >= 4 && consts->MaxFramebufferLayers >= 2048) ||
>           (consts->MaxFramebufferSamples >= consts->MaxSamples &&
>            consts->MaxFramebufferLayers >= consts->MaxArrayTextureLayers)))
>         extensions->ARB_framebuffer_no_attachments = GL_TRUE;
>   
>      /* GL_ARB_ES3_compatibility.
> -    *
> -    * Assume that ES3 is supported if GLSL 3.30 is supported.
> -    * (OpenGL 3.3 is a requirement for that extension.)
> +    * Check requirements for GLSL ES 3.00.
>       */
> -   if (GLSLVersion >= 330 &&
> +   if (GLSLVersion >= 130 &&
> +       extensions->ARB_uniform_buffer_object &&
> +       extensions->ARB_shader_bit_encoding &&
> +       extensions->NV_primitive_restart &&
> +       screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
> +                                PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS) >= 16 &&
>          /* Requirements for ETC2 emulation. */
>          screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_UNORM,
>                                      PIPE_TEXTURE_2D, 0,
>                                      PIPE_BIND_SAMPLER_VIEW) &&
>          screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
>                                      PIPE_TEXTURE_2D, 0,
>                                      PIPE_BIND_SAMPLER_VIEW) &&
>          screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM,
>                                      PIPE_TEXTURE_2D, 0,
>                                      PIPE_BIND_SAMPLER_VIEW) &&
> 


More information about the mesa-dev mailing list