diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-15 20:30:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-16 11:30:01 +0800 |
| commit | 0c366bc0a4332ee14d08f2555396a18cb64229fa (patch) | |
| tree | 72885dc8154a9aeed857708a2be2587eabc0c985 /tests/bugs | |
| parent | 45d9961a6a86d184248ef84f6a07125b0c224f97 (diff) | |
Fix a bug that warning 39001 can't be fully disabled. (#3112)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/warn-39001-disable.slang | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs/warn-39001-disable.slang b/tests/bugs/warn-39001-disable.slang new file mode 100644 index 000000000..f5781fd14 --- /dev/null +++ b/tests/bugs/warn-39001-disable.slang @@ -0,0 +1,30 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -stage compute -profile glsl_450 -target spirv -entry computeMain -warnings-disable 39001 + +//CHECK-NOT: warning +//CHECK-NOT: note +RWStructuredBuffer<float> outputBuffer; +[[vk::binding(1,0)]] Texture2D g_bindlessTexture2D[]; +[[vk::binding(1,0)]] Texture3D g_bindlessTexture3D[]; + +struct GenStruct<T> +{ + T x; +}; + +T test<T>(T val) +{ + return val; +} + + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + uint tid = dispatchThreadID.x; + + float inVal = float(tid); + + float outVal = test<float>(inVal); + + outputBuffer[tid] = outVal; +}
\ No newline at end of file |
