Fix handling of multisampled renderbuffers on GL

This commit is contained in:
baldurk
2021-03-13 00:46:38 +00:00
parent bea31d3489
commit 4cb7648ebc
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -1714,7 +1714,7 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
switch(texDetails.curType)
{
case eGL_RENDERBUFFER:
texSlot = RESTYPE_TEX2D;
texSlot = texDetails.samples > 1 ? RESTYPE_TEX2DMS : RESTYPE_TEX2D;
renderbuffer = true;
break;
case eGL_TEXTURE_1D: texSlot = RESTYPE_TEX1D; break;
@@ -1756,7 +1756,7 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
GL.glBindFramebuffer(eGL_READ_FRAMEBUFFER, curReadFBO);
texname = texDetails.renderbufferReadTex;
target = eGL_TEXTURE_2D;
target = texDetails.samples > 1 ? eGL_TEXTURE_2D_MULTISAMPLE : eGL_TEXTURE_2D;
}
MakeCurrentReplayContext(m_DebugCtx);
@@ -1940,7 +1940,7 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
switch(texDetails.curType)
{
case eGL_RENDERBUFFER:
texSlot = RESTYPE_TEX2D;
texSlot = texDetails.samples > 1 ? RESTYPE_TEX2DMS : RESTYPE_TEX2D;
renderbuffer = true;
break;
case eGL_TEXTURE_1D: texSlot = RESTYPE_TEX1D; break;
@@ -1982,7 +1982,7 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
GL.glBindFramebuffer(eGL_READ_FRAMEBUFFER, curReadFBO);
texname = texDetails.renderbufferReadTex;
target = eGL_TEXTURE_2D;
target = texDetails.samples > 1 ? eGL_TEXTURE_2D_MULTISAMPLE : eGL_TEXTURE_2D;
}
MakeCurrentReplayContext(m_DebugCtx);
+1 -1
View File
@@ -2723,7 +2723,7 @@ void GLReplay::GetTextureData(ResourceId tex, const Subresource &sub,
// then proceed to read from the texture
texname = texDetails.renderbufferReadTex;
texType = eGL_TEXTURE_2D;
texType = texDetails.samples > 1 ? eGL_TEXTURE_2D_MULTISAMPLE : eGL_TEXTURE_2D;
MakeCurrentReplayContext(m_DebugCtx);
}