mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix D3D12 pixel history lacking primIDs for draws without a PS.
* No rendertarget was bound to the primitive ID generating draw because rts is empty in draws without a rendertarget bound in the base draw. Setting rts[0] was presumably stomping memory instead in this case. * Included is a fix for validation layer error thrown when reproducing the problem, in D3D12ColorAndStencilCallback during a Pre/PostDispatch CopyPixel uses the value of m_SavedState but was not set. In the case of rpFlags, the value was uninitialized because D3D12RenderState does not include it in its constructor. That caused an invalid resource transition to be issued and was fortunately caught by the debug layer, otherwise it was thus far invisible when running without debug on.
This commit is contained in:
committed by
Jake Turner
parent
977adf5001
commit
a7e8422237
@@ -989,6 +989,7 @@ struct D3D12ColorAndStencilCallback : public D3D12PixelHistoryCallback
|
||||
|
||||
size_t storeOffset =
|
||||
m_EventIndices.size() * sizeof(D3D12EventInfo) + offsetof(struct D3D12EventInfo, premod);
|
||||
m_SavedState = m_pDevice->GetQueue()->GetCommandData()->GetCurRenderState();
|
||||
CopyPixel(eid, cmd, storeOffset);
|
||||
}
|
||||
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd)
|
||||
@@ -1959,6 +1960,7 @@ struct D3D12PixelHistoryPerFragmentCallback : D3D12PixelHistoryCallback
|
||||
D3D12_CLEAR_FLAG_DEPTH | D3D12_CLEAR_FLAG_STENCIL, 0.0f, 0, 1,
|
||||
&state.scissors[0]);
|
||||
|
||||
state.rts.resize(1);
|
||||
state.rts[0] = *m_CallbackInfo.colorDescriptor;
|
||||
state.dsv = *m_CallbackInfo.dsDescriptor;
|
||||
state.pipe = GetResID(psosIter[i]);
|
||||
|
||||
Reference in New Issue
Block a user