mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-01 04:10:58 +00:00
Fill in the rest of the root signature functions
This commit is contained in:
@@ -89,7 +89,7 @@ class WrappedID3D12GraphicsCommandList : public RefCounter12<ID3D12GraphicsComma
|
||||
// command recording/replay data shared between queues and lists
|
||||
D3D12CommandData *m_Cmd;
|
||||
|
||||
WrappedID3D12RootSignature *m_CurRootSig;
|
||||
WrappedID3D12RootSignature *m_CurGfxRootSig, *m_CurCompRootSig;
|
||||
|
||||
ResourceId m_ResourceID;
|
||||
D3D12ResourceRecord *m_ListRecord;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -291,14 +291,42 @@ void WrappedID3D12CommandQueue::ProcessChunk(uint64_t offset, D3D12ChunkType chu
|
||||
case SET_PIPE: m_ReplayList->Serialise_SetPipelineState(NULL); break;
|
||||
case SET_RTVS: m_ReplayList->Serialise_OMSetRenderTargets(0, NULL, FALSE, NULL); break;
|
||||
case SET_DESC_HEAPS: m_ReplayList->Serialise_SetDescriptorHeaps(0, NULL); break;
|
||||
|
||||
case SET_GFX_ROOT_SIG: m_ReplayList->Serialise_SetGraphicsRootSignature(NULL); break;
|
||||
case SET_GFX_ROOT_TABLE:
|
||||
m_ReplayList->Serialise_SetGraphicsRootDescriptorTable(0, D3D12_GPU_DESCRIPTOR_HANDLE());
|
||||
break;
|
||||
case SET_GFX_ROOT_CONST: m_ReplayList->Serialise_SetGraphicsRoot32BitConstant(0, 0, 0); break;
|
||||
case SET_GFX_ROOT_CONSTS:
|
||||
m_ReplayList->Serialise_SetGraphicsRoot32BitConstants(0, 0, NULL, 0);
|
||||
break;
|
||||
case SET_GFX_ROOT_CBV:
|
||||
m_ReplayList->Serialise_SetGraphicsRootConstantBufferView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
case SET_GFX_ROOT_SRV:
|
||||
m_ReplayList->Serialise_SetGraphicsRootShaderResourceView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
case SET_GFX_ROOT_UAV:
|
||||
m_ReplayList->Serialise_SetGraphicsRootUnorderedAccessView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
|
||||
case SET_COMP_ROOT_SIG: m_ReplayList->Serialise_SetComputeRootSignature(NULL); break;
|
||||
case SET_COMP_ROOT_TABLE:
|
||||
m_ReplayList->Serialise_SetComputeRootDescriptorTable(0, D3D12_GPU_DESCRIPTOR_HANDLE());
|
||||
break;
|
||||
case SET_COMP_ROOT_CONST: m_ReplayList->Serialise_SetComputeRoot32BitConstant(0, 0, 0); break;
|
||||
case SET_COMP_ROOT_CONSTS:
|
||||
m_ReplayList->Serialise_SetComputeRoot32BitConstants(0, 0, NULL, 0);
|
||||
break;
|
||||
case SET_COMP_ROOT_CBV:
|
||||
m_ReplayList->Serialise_SetComputeRootConstantBufferView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
case SET_COMP_ROOT_SRV:
|
||||
m_ReplayList->Serialise_SetComputeRootShaderResourceView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
case SET_COMP_ROOT_UAV:
|
||||
m_ReplayList->Serialise_SetComputeRootUnorderedAccessView(0, D3D12_GPU_VIRTUAL_ADDRESS());
|
||||
break;
|
||||
|
||||
case EXECUTE_CMD_LISTS: Serialise_ExecuteCommandLists(0, NULL); break;
|
||||
case SIGNAL: Serialise_Signal(NULL, 0); break;
|
||||
@@ -515,7 +543,7 @@ WrappedID3D12GraphicsCommandList::WrappedID3D12GraphicsCommandList(ID3D12Graphic
|
||||
m_ListRecord = NULL;
|
||||
m_Cmd = NULL;
|
||||
|
||||
m_CurRootSig = NULL;
|
||||
m_CurGfxRootSig = NULL;
|
||||
|
||||
if(!RenderDoc::Inst().IsReplayApp())
|
||||
{
|
||||
|
||||
@@ -265,12 +265,32 @@ void Serialiser::Serialise(const char *name, D3D12Descriptor &el);
|
||||
D3D12_CHUNK_MACRO(SET_PIPE, "ID3D12GraphicsCommandList::SetPipelineState") \
|
||||
D3D12_CHUNK_MACRO(SET_DESC_HEAPS, "ID3D12GraphicsCommandList::SetDescriptorHeaps") \
|
||||
D3D12_CHUNK_MACRO(SET_RTVS, "ID3D12GraphicsCommandList::OMSetRenderTargets") \
|
||||
\
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_TABLE, \
|
||||
"ID3D12GraphicsCommandList::SetGraphicsRootDescriptorTable") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_SIG, "ID3D12GraphicsCommandList::SetGraphicsRootSignature") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_CONST, "ID3D12GraphicsCommandList::SetGraphicsRoot32BitConstant") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_CONSTS, \
|
||||
"ID3D12GraphicsCommandList::SetGraphicsRoot32BitConstants") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_CBV, \
|
||||
"ID3D12GraphicsCommandList::SetGraphicsRootConstantBufferView") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_SRV, \
|
||||
"ID3D12GraphicsCommandList::SetGraphicsRootShaderResourceView") \
|
||||
D3D12_CHUNK_MACRO(SET_GFX_ROOT_UAV, \
|
||||
"ID3D12GraphicsCommandList::SetGraphicsRootUnorderedAccessView") \
|
||||
\
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_TABLE, \
|
||||
"ID3D12GraphicsCommandList::SetComputeRootDescriptorTable") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_SIG, "ID3D12GraphicsCommandList::SetComputeRootSignature") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_CONST, "ID3D12GraphicsCommandList::SetComputeRoot32BitConstant") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_CONSTS, \
|
||||
"ID3D12GraphicsCommandList::SetComputeRoot32BitConstants") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_CBV, \
|
||||
"ID3D12GraphicsCommandList::SetComputeRootConstantBufferView") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_SRV, \
|
||||
"ID3D12GraphicsCommandList::SetComputeRootShaderResourceView") \
|
||||
D3D12_CHUNK_MACRO(SET_COMP_ROOT_UAV, \
|
||||
"ID3D12GraphicsCommandList::SetComputeRootUnorderedAccessView") \
|
||||
\
|
||||
D3D12_CHUNK_MACRO(EXECUTE_CMD_LISTS, "ID3D12GraphicsCommandQueue::ExecuteCommandLists") \
|
||||
D3D12_CHUNK_MACRO(SIGNAL, "ID3D12GraphicsCommandQueue::Signal") \
|
||||
|
||||
@@ -62,19 +62,18 @@ struct D3D12RenderState
|
||||
{
|
||||
constants.push_back(val);
|
||||
}
|
||||
SignatureElement(UINT offs, UINT numVals, const void *vals, UINT destIdx)
|
||||
SignatureElement(UINT numVals, const void *vals, UINT offs)
|
||||
{
|
||||
type = eRootConst;
|
||||
offset = offs;
|
||||
SetValues(numVals, vals, destIdx);
|
||||
SetValues(numVals, vals, offs);
|
||||
}
|
||||
|
||||
void SetValues(UINT numVals, const void *vals, UINT destIdx)
|
||||
void SetValues(UINT numVals, const void *vals, UINT offs)
|
||||
{
|
||||
if(constants.size() < destIdx + numVals)
|
||||
constants.resize(destIdx + numVals);
|
||||
if(constants.size() < offs + numVals)
|
||||
constants.resize(offs + numVals);
|
||||
|
||||
memcpy(&constants[destIdx], vals, numVals * sizeof(UINT));
|
||||
memcpy(&constants[offs], vals, numVals * sizeof(UINT));
|
||||
}
|
||||
|
||||
void SetToCommandList(D3D12ResourceManager *rm, ID3D12GraphicsCommandList *cmd, UINT slot)
|
||||
@@ -84,8 +83,7 @@ struct D3D12RenderState
|
||||
if(constants.size() == 1)
|
||||
cmd->SetGraphicsRoot32BitConstant(slot, constants[0], (UINT)offset);
|
||||
else
|
||||
cmd->SetGraphicsRoot32BitConstants(slot, (UINT)constants.size(), &constants[0],
|
||||
(UINT)offset);
|
||||
cmd->SetGraphicsRoot32BitConstants(slot, (UINT)constants.size(), &constants[0], 0);
|
||||
}
|
||||
else if(type == eRootTable)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user