Identify depth textures by depth format, not just having DSV flag

This commit is contained in:
baldurk
2016-02-21 15:36:05 +01:00
parent bb408e7de4
commit 49669d676e
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -1893,7 +1893,7 @@ namespace renderdocui.Windows
if (tex == null) return;
bool dsv = ((tex.creationFlags & TextureCreationFlags.DSV) != 0);
bool dsv = ((tex.creationFlags & TextureCreationFlags.DSV) != 0) || (tex.format.compType == FormatComponentType.Depth);
bool uintTex = (tex.format.compType == FormatComponentType.UInt);
bool sintTex = (tex.format.compType == FormatComponentType.SInt);
@@ -2073,7 +2073,11 @@ namespace renderdocui.Windows
m_TexDisplay.linearDisplayAsGamma = gammaDisplay.Checked;
}
if (tex != null && (tex.creationFlags & TextureCreationFlags.DSV) > 0 &&
bool dsv = false;
if(tex != null)
dsv = ((tex.creationFlags & TextureCreationFlags.DSV) != 0) || (tex.format.compType == FormatComponentType.Depth);
if (dsv &&
(string)channels.SelectedItem != "Custom")
{
customRed.Visible = false;