diff options
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/global-uniform.slang | 13 | ||||
| -rw-r--r-- | tests/diagnostics/global-uniform.slang.expected | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/diagnostics/global-uniform.slang b/tests/diagnostics/global-uniform.slang new file mode 100644 index 000000000..a3f17e536 --- /dev/null +++ b/tests/diagnostics/global-uniform.slang @@ -0,0 +1,13 @@ +// global-uniform.slang +//TEST:SIMPLE:-target hlsl + + +// Any attempt to declare a global variable that actually declares a +// global uniform should be diagnosed as unsupported. + +uniform float a; + +const uint4 b = uint4(0,1,2,3); + +struct C { float x; int y; }; +C c; diff --git a/tests/diagnostics/global-uniform.slang.expected b/tests/diagnostics/global-uniform.slang.expected new file mode 100644 index 000000000..a77144c4f --- /dev/null +++ b/tests/diagnostics/global-uniform.slang.expected @@ -0,0 +1,8 @@ +result code = -1 +standard error = { +tests/diagnostics/global-uniform.slang(8): error 39016: 'a' is implicitly a global uniform shader parameter, which is currently unsupported by Slang. If a uniform parameter is intended, use a constant buffer or parameter block. If a global is intended, use the 'static' modifier. +tests/diagnostics/global-uniform.slang(10): error 39016: 'b' is implicitly a global uniform shader parameter, which is currently unsupported by Slang. If a uniform parameter is intended, use a constant buffer or parameter block. If a global is intended, use the 'static' modifier. +tests/diagnostics/global-uniform.slang(13): error 39016: 'c' is implicitly a global uniform shader parameter, which is currently unsupported by Slang. If a uniform parameter is intended, use a constant buffer or parameter block. If a global is intended, use the 'static' modifier. +} +standard output = { +} |
