Add some debug regions in internal GL code

This commit is contained in:
baldurk
2021-03-13 00:47:04 +00:00
parent 414f7bbff6
commit 05e7d1eab9
2 changed files with 13 additions and 1 deletions
+8
View File
@@ -1740,6 +1740,8 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
// need replay context active to do blit (as FBOs aren't shared)
MakeCurrentReplayContext(&m_ReplayCtx);
GLMarkerRegion blitRegion("Renderbuffer Blit");
GLuint curDrawFBO = 0;
GLuint curReadFBO = 0;
GL.glGetIntegerv(eGL_DRAW_FRAMEBUFFER_BINDING, (GLint *)&curDrawFBO);
@@ -1761,6 +1763,8 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
MakeCurrentReplayContext(m_DebugCtx);
GLMarkerRegion region("GetMinMax");
RDCGLenum dsTexMode = eGL_NONE;
if(IsDepthStencilFormat(texDetails.internalFormat))
{
@@ -1966,6 +1970,8 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
// need replay context active to do blit (as FBOs aren't shared)
MakeCurrentReplayContext(&m_ReplayCtx);
GLMarkerRegion blitRegion("Renderbuffer Blit");
GLuint curDrawFBO = 0;
GLuint curReadFBO = 0;
GL.glGetIntegerv(eGL_DRAW_FRAMEBUFFER_BINDING, (GLint *)&curDrawFBO);
@@ -1987,6 +1993,8 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
MakeCurrentReplayContext(m_DebugCtx);
GLMarkerRegion region("GetHistogram");
RDCGLenum dsTexMode = eGL_NONE;
if(IsDepthStencilFormat(texDetails.internalFormat))
{
+5 -1
View File
@@ -86,6 +86,8 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
// need replay context active to do blit (as FBOs aren't shared)
MakeCurrentReplayContext(&m_ReplayCtx);
GLMarkerRegion blitRegion("Renderbuffer Blit");
GLuint curDrawFBO = 0;
GLuint curReadFBO = 0;
drv.glGetIntegerv(eGL_DRAW_FRAMEBUFFER_BINDING, (GLint *)&curDrawFBO);
@@ -110,6 +112,8 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
MakeCurrentReplayContext(m_DebugCtx);
GLMarkerRegion region("RenderTextureInternal");
uint32_t numMips = m_CachedTextures[cfg.resourceId].mips;
GLuint castTexture = 0;
@@ -124,7 +128,7 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, TexDisplayFlags flags)
// if the format didn't change we can't re-interpret this format anyway
if(displayFormat != texDetails.internalFormat)
{
GLMarkerRegion region("Casting texture for view");
GLMarkerRegion castRegion("Casting texture for view");
drv.glGenTextures(1, &castTexture);
drv.glActiveTexture(eGL_TEXTURE0);