mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Make sure DSVs show up with their view parameters properly.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user