mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-29 09:05:49 +00:00
If no pixel shader is bound, don't show shader output in pixel history
This commit is contained in:
@@ -486,6 +486,7 @@ struct PixelModification
|
||||
uint32_t eventID;
|
||||
|
||||
bool32 uavWrite;
|
||||
bool32 unboundPS;
|
||||
|
||||
uint32_t fragIndex;
|
||||
uint32_t primitiveID;
|
||||
|
||||
@@ -1386,6 +1386,8 @@ void Serialiser::Serialise(const char *name, PixelModification &el)
|
||||
Serialise("", el.eventID);
|
||||
|
||||
Serialise("", el.uavWrite);
|
||||
Serialise("", el.unboundPS);
|
||||
|
||||
Serialise("", el.fragIndex);
|
||||
Serialise("", el.primitiveID);
|
||||
|
||||
@@ -1408,7 +1410,7 @@ void Serialiser::Serialise(const char *name, PixelModification &el)
|
||||
Serialise("", el.depthTestFailed);
|
||||
Serialise("", el.stencilTestFailed);
|
||||
|
||||
SIZE_CHECK(PixelModification, 120);
|
||||
SIZE_CHECK(PixelModification, 124);
|
||||
}
|
||||
|
||||
#pragma endregion Data descriptors
|
||||
|
||||
@@ -5319,6 +5319,7 @@ vector<PixelModification> D3D11DebugManager::PixelHistory(vector<EventUsage> eve
|
||||
mod.eventID = events[i].eventID;
|
||||
|
||||
mod.uavWrite = uavWrite;
|
||||
mod.unboundPS = false;
|
||||
|
||||
mod.preMod.col.value_u[0] = (uint32_t)i;
|
||||
|
||||
@@ -6253,6 +6254,9 @@ vector<PixelModification> D3D11DebugManager::PixelHistory(vector<EventUsage> eve
|
||||
m_pImmediateContext->PSGetShader(&curPS, curInst, &curNumInst);
|
||||
m_pImmediateContext->PSSetShader(m_DebugRender.PrimitiveIDPS, NULL, 0);
|
||||
|
||||
if(curPS == NULL)
|
||||
history[h].unboundPS = true;
|
||||
|
||||
m_WrappedDevice->ReplayLog(0, history[h].eventID, eReplay_OnlyDraw);
|
||||
|
||||
m_pImmediateContext->PSSetShader(curPS, curInst, curNumInst);
|
||||
|
||||
@@ -819,6 +819,7 @@ namespace renderdoc
|
||||
public UInt32 eventID;
|
||||
|
||||
public bool uavWrite;
|
||||
public bool unboundPS;
|
||||
|
||||
public UInt32 fragIndex;
|
||||
public UInt32 primitiveID;
|
||||
|
||||
@@ -294,9 +294,14 @@ namespace renderdocui.Windows
|
||||
|
||||
ResourceFormat fmt = new ResourceFormat(floatTex ? FormatComponentType.Float : texture.format.compType, 4, 4);
|
||||
|
||||
string shadOutVal = "Shader Out\n\n" + ModificationValueString(mod.shaderOut, fmt, depth);
|
||||
string shadOutVal;
|
||||
string postModVal = "Tex After\n\n" + ModificationValueString(mod.postMod, texture.format, depth);
|
||||
|
||||
if (mod.unboundPS)
|
||||
shadOutVal = "No Pixel\nShader\nBound";
|
||||
else
|
||||
shadOutVal = "Shader Out\n\n" + ModificationValueString(mod.shaderOut, fmt, depth);
|
||||
|
||||
if (!mod.EventPassed() && hideFailedEventsToolStripMenuItem.Checked)
|
||||
return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user