st/mesa: consider texture view format for fbo blits

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4034
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8387>
(cherry picked from commit 5d9bfcac06)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-01-07 15:50:03 +01:00 committed by Dylan Baker
parent a731f0353e
commit 274c594559
2 changed files with 2 additions and 2 deletions

View file

@ -27922,7 +27922,7 @@
"description": "st/mesa: consider texture view format for fbo blits",
"nominated": false,
"nomination_type": null,
"resolution": 4,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -196,7 +196,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
blit.src.resource = srcObj->pt;
blit.src.level = srcAtt->TextureLevel;
blit.src.box.z = srcAtt->Zoffset + srcAtt->CubeMapFace;
blit.src.format = srcObj->pt->format;
blit.src.format = srcObj->surface_based ? srcObj->surface_format : srcObj->pt->format;
if (!ctx->Color.sRGBEnabled)
blit.src.format = util_format_linear(blit.src.format);