From 0c366bc0a4332ee14d08f2555396a18cb64229fa Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 15 Aug 2023 20:30:01 -0700 Subject: Fix a bug that warning 39001 can't be fully disabled. (#3112) Co-authored-by: Yong He --- tests/bugs/warn-39001-disable.slang | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/bugs/warn-39001-disable.slang (limited to 'tests/bugs') 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 outputBuffer; +[[vk::binding(1,0)]] Texture2D g_bindlessTexture2D[]; +[[vk::binding(1,0)]] Texture3D g_bindlessTexture3D[]; + +struct GenStruct +{ + T x; +}; + +T test(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(inVal); + + outputBuffer[tid] = outVal; +} \ No newline at end of file -- cgit v1.2.3