mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-04 05:41:06 +00:00
Note if a command signature is graphics or compute
This commit is contained in:
@@ -171,6 +171,7 @@ struct D3D12RootSignature
|
||||
|
||||
struct D3D12CommandSignature
|
||||
{
|
||||
bool graphics;
|
||||
UINT ByteStride;
|
||||
vector<D3D12_INDIRECT_ARGUMENT_DESC> arguments;
|
||||
};
|
||||
|
||||
@@ -1345,6 +1345,22 @@ bool WrappedID3D12Device::Serialise_CreateCommandSignature(Serialiser *localSeri
|
||||
wrapped->sig.arguments.insert(wrapped->sig.arguments.begin(), desc.pArgumentDescs,
|
||||
desc.pArgumentDescs + desc.NumArgumentDescs);
|
||||
|
||||
wrapped->sig.graphics = true;
|
||||
|
||||
// From MSDN, command signatures are either graphics or compute so just search for dispatches:
|
||||
// "A given command signature is either a draw or a compute command signature. If a command
|
||||
// signature contains a drawing operation, then it is a graphics command signature. Otherwise,
|
||||
// the command signature must contain a dispatch operation, and it is a compute command
|
||||
// signature."
|
||||
for(uint32_t i = 0; i < desc.NumArgumentDescs; i++)
|
||||
{
|
||||
if(desc.pArgumentDescs[i].Type == D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH)
|
||||
{
|
||||
wrapped->sig.graphics = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ret = wrapped;
|
||||
|
||||
GetResourceManager()->AddLiveResource(CommandSig, ret);
|
||||
|
||||
Reference in New Issue
Block a user