mesa: consider Attrib.MinLayer in do_blit_framebuffer
Otherwise a blit from a fbo with a GL_COLOR_ATTACHMENT0 using a GL_TEXTURE_2D view of a GL_TEXTURE_2D_ARRAY will always read from layer 0. See https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1060 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13527 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
This commit is contained in:
committed by
Marge Bot
parent
13783fe2ef
commit
f521a6270b
@@ -532,7 +532,8 @@ do_blit_framebuffer(struct gl_context *ctx,
|
||||
|
||||
blit.src.resource = srcObj->pt;
|
||||
blit.src.level = srcAtt->TextureLevel;
|
||||
blit.src.box.z = srcAtt->Zoffset + srcAtt->CubeMapFace;
|
||||
blit.src.box.z = srcAtt->Zoffset + srcAtt->CubeMapFace +
|
||||
srcAtt->Texture->Attrib.MinLayer;
|
||||
blit.src.format = srcObj->surface_based ? srcObj->surface_format : srcObj->pt->format;
|
||||
|
||||
if (!ctx->Color.sRGBEnabled)
|
||||
|
||||
Reference in New Issue
Block a user