diff options
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/global-uniform.slang | 4 | ||||
| -rw-r--r-- | tests/diagnostics/global-uniform.slang.expected | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/diagnostics/global-uniform.slang b/tests/diagnostics/global-uniform.slang index 6b17016f2..de4537115 100644 --- a/tests/diagnostics/global-uniform.slang +++ b/tests/diagnostics/global-uniform.slang @@ -2,8 +2,8 @@ //DIAGNOSTIC_TEST:SIMPLE:-target hlsl //DIAGNOSTIC_TEST:COMMAND_LINE_SIMPLE:-target hlsl -// Any attempt to declare a global variable that actually declares a -// global uniform should be diagnosed as unsupported. +// An attempt to declare a global variable that actually declares a +// global shader parameter should be diagnosed, unless `uniform` was used. uniform float a; diff --git a/tests/diagnostics/global-uniform.slang.expected b/tests/diagnostics/global-uniform.slang.expected index a77144c4f..6f69ec0c5 100644 --- a/tests/diagnostics/global-uniform.slang.expected +++ b/tests/diagnostics/global-uniform.slang.expected @@ -1,8 +1,7 @@ -result code = -1 +result code = 0 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. +tests/diagnostics/global-uniform.slang(10): warning 39016: 'b' is implicitly a global shader parameter, not a global variable. If a global variable is intended, add the 'static' modifier. If a uniform shader parameter is intended, add the 'uniform' modifier to silence this warning. +tests/diagnostics/global-uniform.slang(13): warning 39016: 'c' is implicitly a global shader parameter, not a global variable. If a global variable is intended, add the 'static' modifier. If a uniform shader parameter is intended, add the 'uniform' modifier to silence this warning. } standard output = { } |
