mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
Semantics: Catch nested types containing 'int' with non-'flat' interpolation.
This commit is contained in:
parent
50e57560a1
commit
69d01eadd6
@ -37,7 +37,7 @@ struct s {
|
||||
};
|
||||
|
||||
in s badout; // ERROR, can't contain a sampler
|
||||
|
||||
// ERROR, can't have int in struct without flat
|
||||
struct S2 {
|
||||
vec3 c;
|
||||
float f;
|
||||
|
@ -4,6 +4,7 @@ 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
|
||||
ERROR: 0:32: 'uint' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
|
||||
ERROR: 0:39: 'structure' : must be qualified as flat in
|
||||
ERROR: 0:39: 'structure' : non-uniform struct contains a sampler or image: badout
|
||||
ERROR: 0:60: 'texel offset' : argument must be compile-time constant
|
||||
ERROR: 0:62: 'texel offset' : argument must be compile-time constant
|
||||
@ -43,7 +44,7 @@ ERROR: 0:157: 'invariant' : can only apply to an output
|
||||
ERROR: 0:158: 'invariant' : can only apply to an output
|
||||
ERROR: 0:160: 'imageBuffer' : Reserved word.
|
||||
ERROR: 0:160: '' : syntax error
|
||||
ERROR: 44 compilation errors. No code generated.
|
||||
ERROR: 45 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 300
|
||||
|
@ -2,5 +2,5 @@
|
||||
// For the version, it uses the latest git tag followed by the number of commits.
|
||||
// For the date, it uses the current date (when then script is run).
|
||||
|
||||
#define GLSLANG_REVISION "SPIRV99.864"
|
||||
#define GLSLANG_DATE "21-Dec-2015"
|
||||
#define GLSLANG_REVISION "SPIRV99.865"
|
||||
#define GLSLANG_DATE "22-Dec-2015"
|
||||
|
@ -2415,9 +2415,14 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
||||
return;
|
||||
}
|
||||
|
||||
if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || publicType.basicType == EbtDouble) {
|
||||
if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || publicType.basicType == EbtDouble)
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
|
||||
if (! qualifier.flat) {
|
||||
|
||||
if (! qualifier.flat) {
|
||||
if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || publicType.basicType == EbtDouble ||
|
||||
(publicType.userDef && (publicType.userDef->containsBasicType(EbtInt) ||
|
||||
publicType.userDef->containsBasicType(EbtUint) ||
|
||||
publicType.userDef->containsBasicType(EbtDouble)))) {
|
||||
if (qualifier.storage == EvqVaryingIn && language == EShLangFragment)
|
||||
error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage));
|
||||
else if (qualifier.storage == EvqVaryingOut && language == EShLangVertex && version == 300)
|
||||
|
Loading…
Reference in New Issue
Block a user