diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-09-28 13:30:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-28 13:30:37 -0400 |
| commit | dafe651ecf21f2dce7f156179af785adca08ced0 (patch) | |
| tree | 4069004abf2531c1c781dd86896a6e232840c713 /tests/compute | |
| parent | e449446d540b6cc3d5fcd70a8f05886ef2be7547 (diff) | |
Improvements around diagnostic controls (#2414)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Test for disabling warnings.
* Output diagnostic if argument parsing fails in render test.
* More improvements around disabling diagnostics.
* Add support for re enabling a warning.
* Add warning controls to help text.
* Tidy up around NameConventionUtil.
* Make NameConvention an enum.
* Handle leading underscores.
* Update comment, and remove intial handling of _ prefix.
Diffstat (limited to 'tests/compute')
| -rw-r--r-- | tests/compute/disable-warning.slang | 17 | ||||
| -rw-r--r-- | tests/compute/disable-warning.slang.expected.txt | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/compute/disable-warning.slang b/tests/compute/disable-warning.slang new file mode 100644 index 000000000..2fd2bde61 --- /dev/null +++ b/tests/compute/disable-warning.slang @@ -0,0 +1,17 @@ +//TEST(smoke,compute):COMPARE_COMPUTE: -shaderobj -Xslang... -Wno-unrecommended-implicit-conversion -X. +//TEST(smoke,compute):COMPARE_COMPUTE:-cpu -shaderobj -Xslang... -Wno-unrecommended-implicit-conversion -X. + +// Test to check warning disable + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<uint> outputBuffer; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + uint v = dispatchThreadID.x; + // This coercion loses data and would normally produce a warning + int v1 = v; + + outputBuffer[dispatchThreadID.x] = v1; +}
\ No newline at end of file diff --git a/tests/compute/disable-warning.slang.expected.txt b/tests/compute/disable-warning.slang.expected.txt new file mode 100644 index 000000000..bc856dafa --- /dev/null +++ b/tests/compute/disable-warning.slang.expected.txt @@ -0,0 +1,4 @@ +0 +1 +2 +3 |
