Use correct attachment when querying framebuffer mip/layer on clear

This commit is contained in:
baldurk
2021-03-13 00:46:52 +00:00
parent 4cb7648ebc
commit 414f7bbff6
@@ -3651,7 +3651,7 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferfv(SerialiserType &ser,
if(type == eGL_TEXTURE)
{
GLint mip = 0, slice = 0;
GetFramebufferMipAndLayer(framebuffer.name, eGL_COLOR_ATTACHMENT0, &mip, &slice);
GetFramebufferMipAndLayer(framebuffer.name, attachName, &mip, &slice);
draw.copyDestinationSubresource.mip = mip;
draw.copyDestinationSubresource.slice = slice;
}