From f1964bde50e1c0f8dfea5f24d320cf2113b0bab5 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Feb 2021 14:08:42 -0500 Subject: [PATCH] panfrost: Reinterpret format for reload blits Fixes dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32ui_rgb10_a2.texture2d_to_texture2d Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index cb1a2078f8a..5709f018da3 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -793,7 +793,8 @@ panfrost_load_surface(struct panfrost_batch *batch, struct pipe_surface *surf, u rsrc->damage.extent.maxy); } - enum pipe_format format = rsrc->base.format; + /* Note: this may not equal surf->texture->format, we reinterpret */ + enum pipe_format format = surf->format; if (loc == FRAG_RESULT_DEPTH) { if (!util_format_has_depth(util_format_description(format))) @@ -834,10 +835,10 @@ panfrost_load_surface(struct panfrost_batch *batch, struct pipe_surface *surf, u mali_ptr blend_shader = 0; if (loc >= FRAG_RESULT_DATA0 && - !panfrost_blend_format(rsrc->base.format).internal) { + !panfrost_blend_format(format).internal) { struct panfrost_blend_shader *b = panfrost_get_blend_shader(batch->ctx, batch->ctx->blit_blend, - rsrc->base.format, + format, rsrc->base.nr_samples, loc - FRAG_RESULT_DATA0, NULL);