[Mesa-dev] [PATCH] mesa: Be less casual about texture formats in st_finalize_texture

Brian Paul brianp at vmware.com
Tue May 7 08:14:24 PDT 2013


On 05/06/2013 02:41 PM, Adam Jackson wrote:
> Commit 62452883 removed a hunk like
>
>      if (firstImageFormat != stObj->pt->format)
>          st_view_format = firstImageFormat;
>
> from update_single_texture().  This broke piglit/glx-tfp on AMD Barts
> (and probably others), as that hunk was compensating for the mesa and
> gallium layers disagreeing about the format.
>
> Fix this by not ignoring the alpha channel in st_finalize_texture when
> considering whether two 32-bit formats are sufficiently compatible.

It looks like you're undoing change a2817f6ae by Dave Airlie.

Dave should review this.  It's not 100% clear to me what's going on there.

-Brian


>
> Signed-off-by: Adam Jackson<ajax at redhat.com>
> ---
>   src/mesa/state_tracker/st_cb_texture.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index 123ed2b..0f2656c 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -1567,7 +1567,7 @@ st_finalize_texture(struct gl_context *ctx,
>       */
>      if (stObj->pt) {
>         if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) ||
> -          !st_sampler_compat_formats(stObj->pt->format, firstImageFormat) ||
> +          stObj->pt->format != firstImageFormat ||
>             stObj->pt->last_level<  stObj->lastLevel ||
>             stObj->pt->width0 != ptWidth ||
>             stObj->pt->height0 != ptHeight ||



More information about the mesa-dev mailing list