mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-09 09:10:49 +00:00
Fix handling of multisampled renderbuffers on GL
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user