DX12 compute signature Can i have a root signature with 3 root parameters all being of the UAV type? Because what I am trying to do is, add two buffers and put the output of that in a output buffer.

In the following snippet I am trying to do the afroementioned. However, I get an error at the line calling D3DX12SerializeVersionedRootSignature()

Is it because I am not allowed to have 3 uav ranges?

CD3DX12_DESCRIPTOR_RANGE1 ranges_madhu[3];
ranges_madhu[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);
ranges_madhu[1].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);
ranges_madhu[2].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);

CD3DX12_ROOT_PARAMETER1 rootParameters_madhu[ComputeRootParametersCount_madhu]; // this is 3   (thus all 3 ranges have been initialized as UAVs)
rootParameters_madhu[ComputeRootUAVTable_in1].InitAsDescriptorTable(1, &amp;ranges_madhu[0], D3D12_SHADER_VISIBILITY_ALL);
rootParameters_madhu[ComputeRootUAVTable_in2].InitAsDescriptorTable(1, &amp;ranges_madhu[1], D3D12_SHADER_VISIBILITY_ALL);
rootParameters_madhu[ComputeRootUAVTable_outp1].InitAsDescriptorTable(1, &amp;ranges_madhu[2], D3D12_SHADER_VISIBILITY_ALL);

CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC computeRootSignatureDesc_madhu;
computeRootSignatureDesc_madhu.Init_1_1(_countof(rootParameters_madhu), rootParameters_madhu, 0, nullptr);

ComPtr&lt;ID3DBlob&gt; signature1;
ComPtr&lt;ID3DBlob&gt; error1;

ThrowIfFailed(D3DX12SerializeVersionedRootSignature(&amp;computeRootSignatureDesc_madhu, featureData_madhu.HighestVersion, &amp;signature1, &amp;error1));
ThrowIfFailed(m_device-&gt;CreateRootSignature(0, signature1-&gt;GetBufferPointer(), signature1-&gt;GetBufferSize(), IID_PPV_ARGS(&amp;m_computeRootSignature1)));
NAME_D3D12_OBJECT(m_computeRootSignature1);
You're trying to map all three UAVs to the same descriptor slot (slot 0).

ranges_madhu[0].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);
ranges_madhu[1].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);
ranges_madhu[2].Init(D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE);


The baseShaderRegister value (the third parameter to these calls) indicates which descriptor slot to use. You have all of them set to 0, which won't work. They need to be distinct. For example, they could be 0, 1, and 2.