srg-layouts-multiple-unbounded-arrays.azsl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ShaderResourceGroupSemantic slot1
  2. {
  3. FrequencyId = 1;
  4. };
  5. ShaderResourceGroupSemantic slot2
  6. {
  7. FrequencyId = 2;
  8. };
  9. struct MyStruct
  10. {
  11. float4 m_a;
  12. float4 m_b;
  13. };
  14. ShaderResourceGroup SRG1 : slot1
  15. {
  16. Texture2D<float4> m_texSRVa[]; // t0+, space1000
  17. Texture2D<float4> m_texSRVb[]; // t0+, space1001
  18. Texture2D<float4> m_texSRVc; // t0+, space0
  19. Texture2D<float4> m_texSRVd; // t1+, space0
  20. RWTexture2D<float4> m_texUAVa[]; // u0+, space1002
  21. RWTexture2D<float4> m_texUAVb[]; // u0+, space1003
  22. Sampler m_samplera[]; // s0+, space1004
  23. Sampler m_samplerb[]; // s0+, space1005
  24. ConstantBuffer<MyStruct> m_structArraya[]; // b0+, space1006
  25. ConstantBuffer<MyStruct> m_structArrayb[]; // b0+, space1007
  26. };
  27. ShaderResourceGroup SRG2 : slot2
  28. {
  29. Texture2D<float4> m_texSRVa[]; // t0+, space1008
  30. Texture2D<float4> m_texSRVb[]; // t0+, space1009
  31. Texture2D<float4> m_texSRVc; // t0+, space1
  32. Texture2D<float4> m_texSRVd; // t1+, space1
  33. RWTexture2D<float4> m_texUAVa[]; // u0+, space1010
  34. RWTexture2D<float4> m_texUAVb[]; // u0+, space1011
  35. Sampler m_samplera[]; // s0+, space1012
  36. Sampler m_samplerb[]; // s0+, space1013
  37. ConstantBuffer<MyStruct> m_structArraya[]; // b0+, space1014
  38. ConstantBuffer<MyStruct> m_structArrayb[]; // b0+, space1015
  39. };