blob: e99a133c1346e4ce952db4b3e40fb8b1a5ab3e0f [file] [log] [blame]
John Kessenich69968412014-08-13 06:37:59 +00001#version 450 core
2
3out gl_PerVertex {
4 float gl_CullDistance[3];
5};
6
7void main()
8{
9 gl_CullDistance[2] = 4.5;
10}
John Kessenichb07957c2014-10-28 05:24:14 +000011
12out bool outb; // ERROR
13out sampler2D outo; // ERROR
14out float outa[4];
15out float outaa[4][2];
16struct S { float f; };
17out S outs;
18out S[4] outasa;
19out S outsa[4];
20struct SA { float f[4]; };
21out SA outSA;
22struct SS { float f; S s; };
23out SS outSS;
John Kessenich523e20d2017-03-10 18:03:43 -070024
John Kessenich0d0c6d32017-07-23 16:08:26 -060025layout(binding = 0) uniform atomic_uint aui;
26uint ui;
27
John Kessenich523e20d2017-03-10 18:03:43 -070028void foo()
29{
30 SS::f;
John Kessenich0d0c6d32017-07-23 16:08:26 -060031 atomicCounterAdd(aui, ui); // ERROR, need 4.6
32 atomicCounterSubtract(aui, ui); // ERROR, need 4.6
33 atomicCounterMin(aui, ui); // ERROR, need 4.6
34 atomicCounterMax(aui, ui); // ERROR, need 4.6
35 atomicCounterAnd(aui, ui); // ERROR, need 4.6
36 atomicCounterOr(aui, ui); // ERROR, need 4.6
37 atomicCounterXor(aui, ui); // ERROR, need 4.6
38 atomicCounterExchange(aui, ui); // ERROR, need 4.6
39 atomicCounterCompSwap(aui, ui, ui); // ERROR, need 4.6
John Kessenich941f3bb2017-07-23 23:11:41 -060040
41 int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID; // ERROR, need 4.6
John Kessenich934d11b2017-07-23 23:31:44 -060042
43 bool b1;
44 anyInvocation(b1); // ERROR, need 4.6
45 allInvocations(b1); // ERROR, need 4.6
46 allInvocationsEqual(b1); // ERROR, need 4.6
John Kessenich523e20d2017-03-10 18:03:43 -070047}
John Kessenichde16e522017-07-23 14:44:59 -060048; // ERROR: no extraneous semicolons
John Kesseniche1ff2312017-12-16 10:07:22 -070049
50layout(location = 0) uniform locBlock { // ERROR, no location uniform block
51 int a;
52};
53
54layout(location = 0) buffer locBuffBlock { // ERROR, no location on buffer block
55 int b;
56};