3 uniform sampler s; // ERROR, no binding
\r
4 uniform sampler sA[4]; // ERROR, no binding
\r
5 uniform texture2D t2d; // ERROR, no binding
\r
6 uniform texture3D t3d[4]; // ERROR, no binding
\r
8 uniform samplerShadow sShadow;
\r
9 uniform texture3D t3d5[5];
\r
10 writeonly uniform image2D i2d;
\r
14 sampler2D(t2d); // ERROR, need 2 args
\r
15 sampler2D(s, s); // ERROR, wrong type
\r
16 sampler2D(i, i); // ERROR, wrong type
\r
17 sampler2D(t2d, i); // ERROR, wrong type
\r
18 sampler2D(t2d, t2d); // ERROR, wrong type
\r
19 sampler2D(t2d, sA); // ERROR, wrong type
\r
21 sampler3D[4](t3d5, sA[2]); // ERROR, can't make array
\r
22 sampler2D(i2d, s); // ERROR, image instead of texture
\r
23 sampler2D(t3d[1], s); // ERROR, 3D not 2D
\r
24 sampler2D(t2d, sShadow);
\r
25 sampler2DShadow(t2d, s);
\r
28 sampler2D s2D = sampler2D(t2d, s); // ERROR, no sampler constructor
\r
29 sampler3D s3d[4] = sampler3D[4](t3d, sA[2]); // ERROR, no sampler constructor
\r
31 out vec4 color; // ERROR, no location
\r
35 color = texture(s2D, vec2(0.5));
\r
36 color += texture(s3d[i], vec3(0.5));
\r
39 layout(push_constant) buffer pcb { // ERROR, not on a buffer
\r
43 layout(push_constant) uniform float pcfloat; // ERROR 2X: not on a non-block, and non-opaque outside block
\r
45 layout(push_constant) uniform; // ERROR, needs an object
\r
46 layout(binding=2, push_constant) uniform pcbnd1 { // ERROR, can't have binding
\r
49 layout(push_constant) uniform pcbnd2 { // ERROR, can't be array
\r
52 layout(std430, push_constant) uniform pcb1 { int a; } pcb1inst;
\r
53 layout(push_constant) uniform pcb2 {
\r
55 }; // Okay now to have no instance name
\r
57 layout(input_attachment_index = 2) uniform subpassInput subD;
\r
58 layout(input_attachment_index = 3) uniform texture2D subDbad1; // ERROR, not a texture
\r
59 layout(input_attachment_index = 4) writeonly uniform image2D subDbad2; // ERROR, not an image
\r
60 uniform subpassInput subDbad3; // ERROR, need attachment number
\r
61 layout(input_attachment_index = 2) uniform subpassInputMS subDMS;
\r
65 vec4 v = subpassLoad(subD);
\r
66 v += subpassLoadMS(subD); // ERROR, no such function
\r
67 v += subpassLoad(subD, 2); // ERROR, no such sig.
\r
68 v += subpassLoad(subDMS, 2);
\r
69 v += subpassLoadMS(subDMS, 2); // ERROR, no such function
\r
72 subroutine int fooS; // ERROR, not in SPV
\r
73 subroutine int fooSub(); // ERROR, not in SPV
\r
75 uniform vec4 dv4; // ERROR, no default uniforms
\r
79 texture(t2d, vec2(1.0)); // ERROR, need a sampler, not a pure texture
\r
80 imageStore(t2d, ivec2(4, 5), vec4(1.2)); // ERROR, need an image, not a pure texture
\r
83 precision highp float;
\r
85 layout(location=0) in vec2 vTexCoord;
\r
86 layout(location=0) out vec4 FragColor;
\r
88 vec4 userTexture(mediump sampler2D samp, vec2 coord)
\r
90 return texture(samp, coord);
\r
95 void callUserTexture()
\r
97 userTexture(sampler2D(t2d,s), vTexCoord); // ERROR, not point of use
\r
98 userTexture((sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
\r
99 userTexture((sampler2D(t2d,s), sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
\r
100 userTexture(cond ? sampler2D(t2d,s) : sampler2D(t2d,s), vTexCoord); // ERROR, no ?:, not point of use
\r
102 gl_NumSamples; // ERROR, not for Vulkan
\r