attributes_wavesize.hlsl 611 B

12345678910111213141516171819
  1. // RUN: %dxc -E main -T cs_6_6 %s | FileCheck %s
  2. // RUN: %dxc -E main -T cs_6_6 %s -D WAVESIZE=13 | FileCheck %s -check-prefixes=CHECK-ERR
  3. // RUN: %dxc -E main -T cs_6_6 %s -D WAVESIZE=2 | FileCheck %s -check-prefixes=CHECK-ERR
  4. // CHECK: @main, !"main", null, null, [[PROPS:![0-9]+]]}
  5. // CHECK: [[PROPS]] = !{i32 4, [[NT:![0-9]+]], i32 11, [[WS:![0-9]+]]}
  6. // CHECK: [[NT]] = !{i32 1, i32 1, i32 8}
  7. // CHECK: [[WS]] = !{i32 32}
  8. // CHECK-ERR: error: WaveSize value must be between 4 and 128 and a power of 2
  9. #ifndef WAVESIZE
  10. #define WAVESIZE 32
  11. #endif
  12. [wavesize(WAVESIZE)]
  13. [numthreads(1,1,8)]
  14. void main() {
  15. }