summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/capability/capability-invalid-fragment-in-compute.slang
blob: ccf8341675759dd757cdbfef299966629e6cc64d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl
//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl
//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities
//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities

// CHECK_IGNORE_CAPS-NOT: error 36107
// CHECK: error 36107
SamplerState samplerState;
Texture2D<int> rw;

[numthreads(1,1,1)]
void computeMain()
{
    clip(0.0f); // clip is not supported in compute shader, so this throws an error.
}