unbounded-arrays4.azsl 895 B

123456789101112131415161718192021222324252627
  1. // Makes sure unbounded arrays are supported across all register classes t,u,s,b,
  2. // This one fails because resources can not be added after unbounded arrays.
  3. ShaderResourceGroupSemantic slot1
  4. {
  5. FrequencyId = 1;
  6. };
  7. struct MyStruct
  8. {
  9. float3 m_a;
  10. float3 m_b;
  11. };
  12. ShaderResourceGroup SRG1 : slot1
  13. {
  14. Texture2D<float4> m_texSRVa[]; // Takes t0+
  15. Texture2D<float4> m_texSRVb; // #EC 48. Error. t0+ already taken.
  16. RWTexture2D<float4> m_texUAVa[]; // Takes u0+
  17. RWTexture2D<float4> m_texUAVb; // #EC 48. Error. u0+ already taken.
  18. Sampler m_samplera[]; // Takes s0+
  19. Sampler m_samplerb; // #EC 48. Error. s0+ already taken.
  20. ConstantBuffer<MyStruct> m_structArraya[]; // Takes b0+
  21. ConstantBuffer<MyStruct> m_structArrayb; // #EC 48. Error. b0+ already taken.
  22. };