# DX12 DirectX12 root signature error when using AppendStructuredBuffer

## Recommended Posts

I do not have a CBV, but it looks like I am forgetting to bind a CBV. I am getting this error:

D3D12 ERROR: ID3D12Device::CreateComputePipelineState: Root Signature doesn't match Compute Shader: Shader CBV descriptor range (BaseShaderRegister=0, NumDescriptors=1, RegisterSpace=0) is not fully bound in root signature [ STATE_CREATION ERROR #882: CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH]

the hlsl is very small..it's just add to a particle system

##### Share on other sites
// cbuffer \$Globals
// {
//
//   float TimeStep;                    // Offset:    0 Size:     4
//      = 0x3c888889
//
// }

Try declaring your TimeStep as "static const" if you don't plan to override it from the app via constant buffer. Also, you can't use append/consume buffers from root UAVs, they need to be descriptors in a descriptor table.

##### Share on other sites

Thanks SoldierOfLight! "static const" did the trick and I am not getting that error any more. Regarding descriptors, I was able to use append/consume using root UAVs. The same code that I attached originally worked fine. Where does it say that we can't use append/consume buffers from root UAVs.

##### Share on other sites
Quote

If pCounterResource is specified in the call to CreateUnorderedAccessView, then there is a counter associated with the UAV.

Quote

If a shader attempts to access the counter of a UAV that does not have an associated counter, then the debug layer will issue a warning, and a GPU page fault will occur causing the apps’s device to be removed.

Root UAVs don't have associated counters, and therefore cannot be used as append/consume buffers.

##### Share on other sites

I see. It will increment the counter when append is called and decrement the counter when consume is called.So, in my case, I have 256 particles. Every particle is a structure of 36 bytes. I have two UAVs associated to the append and consume structures. I don't get any error, but it doesn't produce anything either. Meaning, either append is not appending or consume is not getting the data from the application. I have attached the files.

## Create an account

Register a new account

• 9
• 56
• 18