Fix identification of GL framebuffer outputs with renderbuffers

This commit is contained in:
baldurk
2021-03-15 23:32:13 +00:00
parent 6634f06cbd
commit ed954cea4d
+7 -2
View File
@@ -268,12 +268,12 @@ RenderOutputSubresource GLReplay::GetRenderOutputSubresource(ResourceId id)
if(res == details.resource)
{
GetFramebufferMipAndLayer(curDrawFBO, att, (GLint *)&ret.mip, (GLint *)&ret.slice);
ret.numSlices = 1;
if(type == eGL_TEXTURE)
{
GetFramebufferMipAndLayer(curDrawFBO, att, (GLint *)&ret.mip, (GLint *)&ret.slice);
// desktop GL allows layered attachments which attach all slices from 0 to N
if(!IsGLES)
{
@@ -298,6 +298,11 @@ RenderOutputSubresource GLReplay::GetRenderOutputSubresource(ResourceId id)
}
}
}
else
{
ret.mip = 0;
ret.slice = 0;
}
}
}