From 73d063281f7cf9f3daf5d3953ba8347c36f6fe0f Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 26 Jul 2016 11:14:44 +0200 Subject: [PATCH] Don't try to display stencil in textures that don't have stencil data --- renderdoc/driver/gl/gl_debug.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 580d5b534..f699d62a9 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -1421,6 +1421,15 @@ bool GLReplay::RenderTextureInternal(TextureDisplay cfg, bool blendAlpha) cfg.Alpha = false; } + // depth-only, make sure we display it as such + if(GetBaseFormat(texDetails.internalFormat) == eGL_DEPTH_COMPONENT) + { + cfg.Red = true; + cfg.Green = false; + cfg.Blue = false; + cfg.Alpha = false; + } + if(!cfg.Red && cfg.Green) { dsTexMode = eGL_STENCIL_INDEX;