summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/global-uniform.slang
blob: 1223f624c0bc62587014767c00da0f0b1bd8baf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// global-uniform.slang
//DIAGNOSTIC_TEST:SIMPLE:-target hlsl
//DIAGNOSTIC_TEST:COMMAND_LINE_SIMPLE:-target hlsl

// An attempt to declare a global variable that actually declares a
// global shader parameter should be diagnosed, unless `uniform` was used.

uniform float a;

static const uint4 b = uint4(0,1,2,3);

struct C { float x; int y; };
C c;