[Mesa-dev] [PATCH] st/mesa: remove ARB_color_buffer_float from core profile contexts

Edward O'Callaghan funfunctor at folklore1984.net
Tue Jan 10 15:15:11 UTC 2017


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 01/11/2017 01:59 AM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> Some parts of the extension were explicitly removed for core profiles,
> and all the remaining functionality has been in core since core profiles
> exist. So there's no loss of exposed functionality.
> 
> The corresponding change was applied to i965 in 2013 (commit
> bd850cb4f2c77e2eb6716c865c40b9976633fc23), so it's not like
> applications could be surprised by this behavior either.
> 
> Fixes GL45-CTS.gtf30.GL3Tests.half_float.half_float_textures.
> ---
>  src/mesa/state_tracker/st_context.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
> index 0eae971..a2df704 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -450,32 +450,28 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
>  
>     /* Enable shader-based fallbacks for ARB_color_buffer_float if needed. */
>     if (screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_UNCLAMPED)) {
>        if (!screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_CLAMPED)) {
>           st->clamp_vert_color_in_shader = GL_TRUE;
>        }
>  
>        if (!screen->get_param(screen, PIPE_CAP_FRAGMENT_COLOR_CLAMPED)) {
>           st->clamp_frag_color_in_shader = GL_TRUE;
>        }
> -
> -      /* For drivers which cannot do color clamping, it's better to just
> -       * disable ARB_color_buffer_float in the core profile, because
> -       * the clamping is deprecated there anyway. */
> -      if (ctx->API == API_OPENGL_CORE &&
> -          (st->clamp_frag_color_in_shader || st->clamp_vert_color_in_shader)) {
> -         st->clamp_vert_color_in_shader = GL_FALSE;
> -         st->clamp_frag_color_in_shader = GL_FALSE;
> -         ctx->Extensions.ARB_color_buffer_float = GL_FALSE;
> -      }
>     }
>  
> +   /* Disable ARB_color_buffer_float for core contexts, since some of its
> +    * functionality was explicitly removed.
> +    */
> +   if (ctx->API == API_OPENGL_CORE)
> +      ctx->Extensions.ARB_color_buffer_float = GL_FALSE;
> +
>     /* called after _mesa_create_context/_mesa_init_point, fix default user
>      * settable max point size up
>      */
>     ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
>                               ctx->Const.MaxPointSizeAA);
>     /* For vertex shaders, make sure not to emit saturate when SM 3.0 is not supported */
>     ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = !st->has_shader_model3;
>  
>     if (!ctx->Extensions.ARB_gpu_shader5) {
>        for (i = 0; i < MESA_SHADER_STAGES; i++)
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170111/ed86eebf/attachment-0001.sig>


More information about the mesa-dev mailing list