[Mesa-dev] [RFC 01/27] i965: Remove unused sampler key fields

Ian Romanick idr at freedesktop.org
Mon Feb 24 10:48:05 PST 2014


It seems very weird that these are unused.  Are GL_YCBCR_MESA just 
completely broken on our driver?  If so, we should probably disable that 
extension...

On 02/22/2014 01:05 AM, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   src/mesa/drivers/dri/i965/brw_program.h |  6 ------
>   src/mesa/drivers/dri/i965/brw_wm.c      | 10 ----------
>   2 files changed, 16 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h
> index 59f628b..6aa0ac1 100644
> --- a/src/mesa/drivers/dri/i965/brw_program.h
> +++ b/src/mesa/drivers/dri/i965/brw_program.h
> @@ -42,12 +42,6 @@ struct brw_sampler_prog_key_data {
>      uint16_t gl_clamp_mask[3];
>
>      /**
> -    * YUV conversions, needed for the GL_MESA_ycbcr extension.
> -    */
> -   uint16_t yuvtex_mask;
> -   uint16_t yuvtex_swap_mask; /**< UV swaped */
> -
> -   /**
>       * For RG32F, gather4's channel select is broken.
>       */
>      uint16_t gather_channel_quirk_mask;
> diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
> index 0d0d6ec..9edb245 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm.c
> @@ -238,10 +238,6 @@ brw_debug_recompile_sampler_key(struct brw_context *brw,
>                         old_key->gl_clamp_mask[1], key->gl_clamp_mask[1]);
>      found |= key_debug(brw, "GL_CLAMP enabled on any texture unit's 3rd coordinate",
>                         old_key->gl_clamp_mask[2], key->gl_clamp_mask[2]);
> -   found |= key_debug(brw, "GL_MESA_ycbcr texturing\n",
> -                      old_key->yuvtex_mask, key->yuvtex_mask);
> -   found |= key_debug(brw, "GL_MESA_ycbcr UV swapping\n",
> -                      old_key->yuvtex_swap_mask, key->yuvtex_swap_mask);
>      found |= key_debug(brw, "gather channel quirk on any texture unit",
>                         old_key->gather_channel_quirk_mask, key->gather_channel_quirk_mask);
>
> @@ -356,12 +352,6 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
>            if (alpha_depth || (brw->gen < 8 && !brw->is_haswell))
>               key->swizzles[s] = brw_get_texture_swizzle(ctx, t);
>
> -	 if (img->InternalFormat == GL_YCBCR_MESA) {
> -	    key->yuvtex_mask |= 1 << s;
> -	    if (img->TexFormat == MESA_FORMAT_YCBCR)
> -		key->yuvtex_swap_mask |= 1 << s;
> -	 }
> -
>   	 if (sampler->MinFilter != GL_NEAREST &&
>   	     sampler->MagFilter != GL_NEAREST) {
>   	    if (sampler->WrapS == GL_CLAMP)
>



More information about the mesa-dev mailing list