RootSigUnique.azsl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ShaderResourceGroupSemantic Slot0 { FrequencyId = 0; };
  2. ShaderResourceGroupSemantic Slot1 { FrequencyId = 1; };
  3. ShaderResourceGroupSemantic Slot2 { FrequencyId = 2; };
  4. ShaderResourceGroupSemantic Slot3 { FrequencyId = 3; };
  5. ShaderResourceGroupSemantic Slot4 { FrequencyId = 4; };
  6. ShaderResourceGroupSemantic Slot5 { FrequencyId = 5; };
  7. ShaderResourceGroup SRG0 : Slot0
  8. {
  9. float4 float4Test00;
  10. Sampler m_dynamicSampler_1;
  11. float4 float4Test01;
  12. SamplerComparisonState m_staticSampler1
  13. {
  14. ComparisonFunc = Never;
  15. };
  16. float4 float4Test02;
  17. RWTexture3D m_texRW3D;
  18. float4 float4Test03;
  19. Sampler m_dynamicSampler_Array[4];
  20. SamplerComparisonState m_staticSampler2
  21. {
  22. ComparisonFunc = Never;
  23. };
  24. float4 float4Test04;
  25. };
  26. ShaderResourceGroup SRG1 : Slot1
  27. {
  28. struct SomeInsideStruct
  29. {
  30. float4x4 m_someMatrix;
  31. };
  32. struct MaterialConstants
  33. {
  34. struct SomeNestedStruct
  35. {
  36. float4x4 m_someMatrix;
  37. } m_inlinedStructInstance; // nested in the struct declaration
  38. SomeInsideStruct m_insideScopeStruct; // declared in the same SRG
  39. bool4 m_someBoolVariable;
  40. double m_someDoubleVariable;
  41. };
  42. ConstantBuffer<MaterialConstants> m_materialConstants;
  43. Texture2D m_tex2D; // texturePredefinedType
  44. Texture2D<float4> m_tex2DG; // genericTexturePredefinedType
  45. Texture2DArray m_tex2DArray; // texturePredefinedType
  46. Texture2DArray<float4> m_tex2DArrayG; // genericTexturePredefinedType
  47. };
  48. ShaderResourceGroup SRG2 : Slot2
  49. {
  50. float4 exampleColor;
  51. Texture2D m_tex2D; // texturePredefinedType
  52. Texture2D<float4> m_tex2DG; // genericTexturePredefinedType
  53. Texture2DArray m_tex2DArray; // texturePredefinedType
  54. Texture2DArray<float4> m_tex2DArrayG; // genericTexturePredefinedType
  55. RWTexture2D m_texRW2D; // texturePredefinedType
  56. RWTexture2D<float4> m_texRW2DG; // genericTexturePredefinedType
  57. RWTexture2DArray m_texRW2DArray; // texturePredefinedType
  58. RWTexture2DArray<float4> m_texRW2DArrayG; // genericTexturePredefinedType
  59. };
  60. ShaderResourceGroup SRG3 : Slot3
  61. {
  62. float4 exampleColor;
  63. RWTexture2D m_texRW2D[4]; // texturePredefinedType
  64. RWTexture2D<float4> m_texRW2DG; // genericTexturePredefinedType
  65. RWTexture2DArray m_texRW2DArray; // texturePredefinedType
  66. RWTexture2DArray<float4> m_texRW2DArrayG; // genericTexturePredefinedType
  67. };
  68. struct UserStruct
  69. {
  70. int m_myInt;
  71. float m_myFloat;
  72. double m_myDouble;
  73. bool m_myBool;
  74. };
  75. ShaderResourceGroup SRG4 : Slot4
  76. {
  77. AppendStructuredBuffer<UserStruct> m_appendView;
  78. ConsumeStructuredBuffer<UserStruct> m_consumeView;
  79. Buffer<float> m_bufferView[3];
  80. StructuredBuffer<UserStruct> m_structuredView;
  81. RWBuffer<float4x4> m_rwView;
  82. RasterizerOrderedBuffer<int4> m_roView;
  83. };
  84. ShaderResourceGroup SRG5 : Slot5
  85. {
  86. float4 exampleColor;
  87. };