cbuffer-structarray.hlsl 609 B

1234567891011121314151617181920
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. struct Foo {
  3. float4 f;
  4. };
  5. typedef Foo FooA[2];
  6. // CHECK: error: 'const FooA' (aka 'Foo const[2]') cannot be used as a type parameter where a struct is required
  7. ConstantBuffer<FooA> CB1;
  8. // CHECK: error: 'const FooA' (aka 'Foo const[2]') cannot be used as a type parameter where a struct is required
  9. ConstantBuffer<FooA> CB[4][3];
  10. // CHECK: error: 'const FooA' (aka 'Foo const[2]') cannot be used as a type parameter where a struct is required
  11. TextureBuffer<FooA> TB[4][3];
  12. float4 main(int a : A) : SV_Target
  13. {
  14. return CB[3][2][1].f * TB[3][2][1].f;
  15. }