Make sure DSVs show up with their view parameters properly.

This commit is contained in:
baldurk
2016-09-28 15:51:54 +02:00
parent 4ccfe298f3
commit bfcfcd37b5
3 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ struct ResourceFormat
bool operator==(const ResourceFormat &r) const
{
if(special || r.special)
return special == r.special && specialFormat == r.specialFormat;
return special == r.special && specialFormat == r.specialFormat && compType == r.compType;
return compCount == r.compCount && compByteWidth == r.compByteWidth && compType == r.compType &&
bgraOrder == r.bgraOrder && srgbCorrected == r.srgbCorrected;
+1 -1
View File
@@ -180,7 +180,7 @@ namespace renderdoc
if ((object)y == null) return (object)x == null;
if (x.special || y.special)
return x.special == y.special && x.specialFormat == y.specialFormat;
return x.special == y.special && x.specialFormat == y.specialFormat && x.compType == y.compType;
return x.compCount == y.compCount &&
x.compByteWidth == y.compByteWidth &&
@@ -71,10 +71,15 @@ namespace renderdocui.Windows.PipelineState
{
view = v;
tex = t;
DepthReadOnly = false;
StencilReadOnly = false;
}
public D3D11PipelineState.ShaderStage.ResourceView view;
public FetchTexture tex;
public bool DepthReadOnly, StencilReadOnly;
};
private class ViewBufTag
@@ -1614,10 +1619,16 @@ namespace renderdocui.Windows.PipelineState
format = "Viewed as " + state.m_OM.DepthTarget.Format.ToString();
}
if (HasImportantViewParams(state.m_OM.DepthTarget, texs[t]))
if (HasImportantViewParams(state.m_OM.DepthTarget, texs[t]) ||
state.m_OM.DepthReadOnly || state.m_OM.StencilReadOnly)
viewDetails = true;
tag = new ViewTexTag(state.m_OM.DepthTarget, texs[t]);
ViewTexTag textag = new ViewTexTag(state.m_OM.DepthTarget, texs[t]);
textag.DepthReadOnly = state.m_OM.DepthReadOnly;
textag.StencilReadOnly = state.m_OM.StencilReadOnly;
tag = textag;
}
}
@@ -1824,6 +1835,12 @@ namespace renderdocui.Windows.PipelineState
text += String.Format("The texture is format {0}, the view treats it as {1}.\n",
tex.tex.format, tex.view.Format);
if (tex.DepthReadOnly)
text += "Depth component is read-only\n";
if (tex.StencilReadOnly)
text += "Stencil component is read-only\n";
if (tex.tex.mips > 1 && (tex.tex.mips != tex.view.NumMipLevels || tex.view.HighestMip > 0))
{
if (tex.view.NumMipLevels == 1)