13 {
15 D3D12_INDIRECT_ARGUMENT_DESC argumentDesc = {};
16 argumentDesc.Type = indexed ? D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED
17 : D3D12_INDIRECT_ARGUMENT_TYPE_DRAW;
18 argumentDesc.VertexBuffer.Slot = slot;
19
20 D3D12_COMMAND_SIGNATURE_DESC commandSigDesc = {};
21 commandSigDesc.ByteStride = indexed ? sizeof(D3D12_DRAW_INDEXED_ARGUMENTS)
22 : sizeof(D3D12_DRAW_ARGUMENTS);
23 commandSigDesc.NumArgumentDescs = 1;
24 commandSigDesc.pArgumentDescs = &argumentDesc;
25 commandSigDesc.NodeMask = 0;
26
28 HRESULT hr = gpu->
device()->CreateCommandSignature(&commandSigDesc,
nullptr,
29 IID_PPV_ARGS(&commandSig));
31 SkDebugf(
"Failed to create command signature.\n");
32 return nullptr;
33 }
34
36 forIndexed, slot));
37}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
ID3D12Device * device() const