Add semantic checks for order of qualification and repetition within a class of qualifiers.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22145 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-06-24 21:22:03 +00:00
parent f5c1075031
commit 01fc0645cb
9 changed files with 89 additions and 43 deletions

View File

@@ -9,9 +9,9 @@ precision highp float;
in vec4 i;
out vec4 o;
in flat float fflat;
in smooth float fsmooth;
in noperspective float fnop;
flat in float fflat;
smooth in float fsmooth;
noperspective in float fnop;
void main()
{

View File

@@ -5,9 +5,17 @@ uniform mat3x3 m33;
uniform mat4x4 m44;
in vec3 v3;
varying vec2 v2; // ERROR
in vec4 bad[10]; // ERROR
varying vec2 v2; // ERROR, varying reserved
in vec4 bad[10]; // ERROR, no arrayed inputs
highp in vec4 badorder; // ERROR, incorrect qualifier order
out invariant vec4 badorder2; // ERROR, incorrect qualifier order
in centroid vec4 badorder4; // ERROR, incorrect qualifier order
out flat vec4 badorder3; // ERROR, incorrect qualifier order
void bar(in const float a); // ERROR, incorrect qualifier order
void bar2(highp in float b); // ERROR, incorrect qualifier order
smooth flat out vec4 rep; // ERROR, replicating interpolation qualification
centroid sample out vec4 rep2; // ERROR, replicating auxiliary qualification
in uniform vec4 rep3; // ERROR, replicating storage qualification
struct S {
vec3 c;

13
Test/420.vert Normal file
View File

@@ -0,0 +1,13 @@
#version 420 core
varying vec2 v2; // ERROR, varying reserved
in vec4 bad[10];
highp in vec4 badorder;
out invariant vec4 badorder2;
in centroid vec4 badorder4; // ERROR, no centroid input to vertex stage
out flat vec4 badorder3;
void bar(in const float a);
void bar2(highp in float b);
smooth flat out vec4 rep; // ERROR, replicating interpolation qualification
centroid sample out vec4 rep2; // ERROR, replicating auxiliary qualification
in uniform vec4 rep3; // ERROR, replicating storage qualification

View File

@@ -1,7 +1,7 @@
#version 300 es
uniform int c, d;
highp in float x;
in highp float x;
void main()
{

View File

@@ -39,4 +39,5 @@ uint.frag
switch.frag
tokenLength.vert
300scope.vert
420.vert
430scope.vert