mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 02:46:40 +00:00
11 lines
553 B
HLSL
11 lines
553 B
HLSL
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel5.0-library -verify %s
|
|
// WaveActiveCountBits is unavailable before ShaderModel 6.0.
|
|
|
|
[shader("compute")]
|
|
[numthreads(8,8,1)]
|
|
unsigned foo() {
|
|
// expected-error@#site {{'WaveActiveCountBits' is only available on Shader Model 6.0 or newer}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics.h:* {{'WaveActiveCountBits' has been marked as being introduced in Shader Model 6.0 here, but the deployment target is Shader Model 5.0}}
|
|
return hlsl::WaveActiveCountBits(1); // #site
|
|
}
|