mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 14:36:35 +00:00
Add some debug regions in internal GL code
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user