Add test of Set*Root32BitConstants with 0 constants being set

* This crashes on nvidia, on compute only strangely, if we pass in a NULL
  pointer along with a 0 number of constants.
This commit is contained in:
baldurk
2023-08-03 14:21:17 +01:00
parent 3460be091a
commit 65859d13bf
@@ -142,8 +142,8 @@ float4 main() : SV_Target0
ID3D12RootSignaturePtr duplicateSig = MakeSig(
{
cbvParam(D3D12_SHADER_VISIBILITY_PIXEL, 0, 0),
constParam(D3D12_SHADER_VISIBILITY_PIXEL, 0, 1, 1),
cbvParam(D3D12_SHADER_VISIBILITY_ALL, 0, 0),
constParam(D3D12_SHADER_VISIBILITY_ALL, 0, 1, 1),
},
D3D12_ROOT_SIGNATURE_FLAG_NONE);
@@ -347,6 +347,10 @@ float4 main() : SV_Target0
cmd->SetDescriptorHeaps(2, heaps);
cmd->SetComputeRootSignature(duplicateSig);
cmd->SetComputeRoot32BitConstants(1, 0, &debug, 0);
cmd->SetGraphicsRoot32BitConstants(1, 0, &debug, 0);
IASetVertexBuffer(cmd, vb2, sizeof(DefaultA2V), 0);
IASetVertexBuffer(cmd, vb, sizeof(DefaultA2V), 0);
D3D12_INDEX_BUFFER_VIEW view;