зеркало из https://github.com/stride3d/xkslang.git
Add missing precision qualifier checks to function formal parameter declarations.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28442 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
Родитель
758c15720d
Коммит
f57aa7bd91
|
@ -1,5 +1,5 @@
|
|||
#version 300 es
|
||||
|
||||
void nodef1(float f); // ERROR, no default precision
|
||||
uniform sampler2D s2D;
|
||||
uniform lowp sampler3D s3D;
|
||||
uniform samplerCube sCube;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#version 310 es
|
||||
|
||||
highp float nodef3(float); // ERROR, no default precision
|
||||
precision mediump float;
|
||||
precision highp usampler2D;
|
||||
precision highp sampler2D;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
300.frag
|
||||
ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
|
||||
ERROR: 0:30: 'noperspective' : Reserved word.
|
||||
ERROR: 0:30: 'noperspective' : not supported with this profile: es
|
||||
ERROR: 0:31: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: bads
|
||||
|
@ -37,7 +38,7 @@ ERROR: 0:148: 'qualifier' : cannot use auxiliary, memory, interpolation, or prec
|
|||
ERROR: 0:150: 'early_fragment_tests' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:152: 'imageBuffer' : Reserved word.
|
||||
ERROR: 0:152: '' : syntax error
|
||||
ERROR: 38 compilation errors. No code generated.
|
||||
ERROR: 39 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 300
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
310.frag
|
||||
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
|
||||
ERROR: 0:8: 'origin_upper_left' : not supported with this profile: es
|
||||
ERROR: 0:8: 'pixel_center_integer' : not supported with this profile: es
|
||||
ERROR: 0:8: 'gl_FragCoord' : identifiers starting with "gl_" are reserved
|
||||
|
@ -28,7 +29,7 @@ ERROR: 0:102: 'out' : cannot be bool
|
|||
ERROR: 0:103: 'image2D' : sampler/image types can only be used in uniform variables or function parameters: imageOut
|
||||
ERROR: 0:103: '' : image variables not declared 'writeonly' must have a format layout qualifier
|
||||
ERROR: 0:104: 'out' : cannot be a matrix
|
||||
ERROR: 28 compilation errors. No code generated.
|
||||
ERROR: 29 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 310
|
||||
|
|
|
@ -811,6 +811,7 @@ parameter_declarator
|
|||
parseContext.error($2.loc, "illegal use of type 'void'", $2.string->c_str(), "");
|
||||
}
|
||||
parseContext.reservedErrorCheck($2.loc, *$2.string);
|
||||
parseContext.precisionQualifierCheck($1.loc, $1);
|
||||
|
||||
TParameter param = {$2.string, new TType($1)};
|
||||
$$.loc = $2.loc;
|
||||
|
@ -825,7 +826,8 @@ parameter_declarator
|
|||
parseContext.arrayDimCheck($2.loc, $1.arraySizes, $3.arraySizes);
|
||||
|
||||
parseContext.arraySizeRequiredCheck($3.loc, $3.arraySizes->getSize());
|
||||
parseContext.reservedErrorCheck($2.loc, *$2.string);
|
||||
parseContext.reservedErrorCheck($2.loc, *$2.string);
|
||||
parseContext.precisionQualifierCheck($1.loc, $1);
|
||||
|
||||
$1.arraySizes = $3.arraySizes;
|
||||
|
||||
|
@ -880,6 +882,7 @@ parameter_type_specifier
|
|||
$$.param = param;
|
||||
if ($1.arraySizes)
|
||||
parseContext.arraySizeRequiredCheck($1.loc, $1.arraySizes->getSize());
|
||||
parseContext.precisionQualifierCheck($1.loc, $1);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче