yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeDiagnose on initExpr of a global `const` decl (#7711)56e91e91e

master
351 B13 linesraw
1// global-uniform.slang
2//DIAGNOSTIC_TEST:SIMPLE:-target hlsl
3//DIAGNOSTIC_TEST:COMMAND_LINE_SIMPLE:-target hlsl
4
5// An attempt to declare a global variable that actually declares a
6// global shader parameter should be diagnosed, unless `uniform` was used.
7
8uniform float a;
9
10static const uint4 b = uint4(0,1,2,3);
11
12struct C { float x; int y; };
13C c;