| 1 |
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ |
| 2 |
// RUN: dxil-pc-shadermodel6.6-compute %s -DSM66 -hlsl-entry foo \ |
| 3 |
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s |
| 4 |
|
| 5 |
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ |
| 6 |
// RUN: dxil-pc-shadermodel6.8-compute %s -DNO_PREFERR -hlsl-entry foo \ |
| 7 |
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=NO_PREFERR |
| 8 |
|
| 9 |
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ |
| 10 |
// RUN: dxil-pc-shadermodel6.8-compute %s -hlsl-entry foo \ |
| 11 |
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-SM68 |
| 12 |
|
| 13 |
|
| 14 |
// Make sure wavesize attribute get correct value for sm66 and sm68. |
| 15 |
// CHECK:define void @foo() |
| 16 |
// CHECK:"hlsl.wavesize"="8,0,0" |
| 17 |
|
| 18 |
// NO_PREFERR:define void @foo() |
| 19 |
// NO_PREFERR:"hlsl.wavesize"="8,128,0" |
| 20 |
|
| 21 |
// CHECK-SM68:define void @foo() |
| 22 |
// CHECK-SM68:"hlsl.wavesize"="8,128,64" |
| 23 |
|
| 24 |
[numthreads(16,8,1)] |
| 25 |
#ifdef SM66 |
| 26 |
[WaveSize(8)] |
| 27 |
#elif NO_PREFERR |
| 28 |
[WaveSize(8, 128)] |
| 29 |
#else |
| 30 |
[WaveSize(8, 128, 64)] |
| 31 |
#endif |
| 32 |
void foo() { |
| 33 |
|
| 34 |
} |