Commit 482434b1 by John Kessenich

Merge branch GitHum 'master' into GitLab master

parents d8af9783 e0b6cad4
...@@ -37,7 +37,7 @@ struct s { ...@@ -37,7 +37,7 @@ struct s {
}; };
in s badout; // ERROR, can't contain a sampler in s badout; // ERROR, can't contain a sampler
// ERROR, can't have int in struct without flat
struct S2 { struct S2 {
vec3 c; vec3 c;
float f; float f;
......
...@@ -4,6 +4,7 @@ ERROR: 0:30: 'noperspective' : Reserved word. ...@@ -4,6 +4,7 @@ ERROR: 0:30: 'noperspective' : Reserved word.
ERROR: 0:30: 'noperspective' : not supported with this profile: es 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: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: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:39: 'structure' : non-uniform struct contains a sampler or image: badout
ERROR: 0:60: 'texel offset' : argument must be compile-time constant ERROR: 0:60: 'texel offset' : argument must be compile-time constant
ERROR: 0:62: '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 ...@@ -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:158: 'invariant' : can only apply to an output
ERROR: 0:160: 'imageBuffer' : Reserved word. ERROR: 0:160: 'imageBuffer' : Reserved word.
ERROR: 0:160: '' : syntax error ERROR: 0:160: '' : syntax error
ERROR: 44 compilation errors. No code generated. ERROR: 45 compilation errors. No code generated.
Shader version: 300 Shader version: 300
......
...@@ -7,12 +7,12 @@ Linked vertex stage: ...@@ -7,12 +7,12 @@ Linked vertex stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 63 // Id's are bound by 69
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 61 62 EntryPoint Vertex 4 "main" 62 65 67 68
Source GLSL 450 Source GLSL 450
Name 4 "main" Name 4 "main"
Name 14 "S" Name 14 "S"
...@@ -82,8 +82,18 @@ Linked vertex stage: ...@@ -82,8 +82,18 @@ Linked vertex stage:
MemberName 57(bBt3) 0 "ntcol" MemberName 57(bBt3) 0 "ntcol"
MemberName 57(bBt3) 1 "ntrow" MemberName 57(bBt3) 1 "ntrow"
Name 59 "bBtn3" Name 59 "bBtn3"
Name 61 "gl_VertexID" Name 60 "S"
Name 62 "gl_InstanceID" MemberName 60(S) 0 "a"
MemberName 60(S) 1 "b"
MemberName 60(S) 2 "c"
Name 62 "sout"
Name 63 "S"
MemberName 63(S) 0 "a"
MemberName 63(S) 1 "b"
MemberName 63(S) 2 "c"
Name 65 "soutinv"
Name 67 "gl_VertexID"
Name 68 "gl_InstanceID"
Decorate 13 ArrayStride 32 Decorate 13 ArrayStride 32
MemberDecorate 14(S) 0 Offset 0 MemberDecorate 14(S) 0 Offset 0
MemberDecorate 14(S) 1 ColMajor MemberDecorate 14(S) 1 ColMajor
...@@ -156,8 +166,15 @@ Linked vertex stage: ...@@ -156,8 +166,15 @@ Linked vertex stage:
Decorate 57(bBt3) BufferBlock Decorate 57(bBt3) BufferBlock
Decorate 59(bBtn3) DescriptorSet 1 Decorate 59(bBtn3) DescriptorSet 1
Decorate 59(bBtn3) Binding 0 Decorate 59(bBtn3) Binding 0
Decorate 61(gl_VertexID) BuiltIn VertexId MemberDecorate 60(S) 0 Flat
Decorate 62(gl_InstanceID) BuiltIn InstanceId MemberDecorate 60(S) 1 Flat
MemberDecorate 60(S) 2 Flat
MemberDecorate 63(S) 0 Invariant
MemberDecorate 63(S) 1 Invariant
MemberDecorate 63(S) 2 Invariant
Decorate 65(soutinv) Invariant
Decorate 67(gl_VertexID) BuiltIn VertexId
Decorate 68(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
...@@ -214,9 +231,15 @@ Linked vertex stage: ...@@ -214,9 +231,15 @@ Linked vertex stage:
57(bBt3): TypeStruct 48(Nestor) 53(Nestor) 57(bBt3): TypeStruct 48(Nestor) 53(Nestor)
58: TypePointer Uniform 57(bBt3) 58: TypePointer Uniform 57(bBt3)
59(bBtn3): 58(ptr) Variable Uniform 59(bBtn3): 58(ptr) Variable Uniform
60: TypePointer Input 6(int) 60(S): TypeStruct 8(ivec3) 13 7(int)
61(gl_VertexID): 60(ptr) Variable Input 61: TypePointer Output 60(S)
62(gl_InstanceID): 60(ptr) Variable Input 62(sout): 61(ptr) Variable Output
63(S): TypeStruct 8(ivec3) 13 7(int)
64: TypePointer Output 63(S)
65(soutinv): 64(ptr) Variable Output
66: TypePointer Input 6(int)
67(gl_VertexID): 66(ptr) Variable Input
68(gl_InstanceID): 66(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
Return Return
......
#version 450 #version 450
// should get 3 SPV types for S: no layout, 140, and 430 // should get 3 SPV types for S: no layout, 140, and 430, plus extras for interpolation or invariant differences
struct S struct S
{ {
highp uvec3 a; highp uvec3 a;
...@@ -71,3 +71,6 @@ layout(set = 1, binding = 0, std430) buffer bBt3 ...@@ -71,3 +71,6 @@ layout(set = 1, binding = 0, std430) buffer bBt3
void main() void main()
{ {
} }
flat out S sout;
invariant out S soutinv;
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // 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). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.864" #define GLSLANG_REVISION "SPIRV99.866"
#define GLSLANG_DATE "21-Dec-2015" #define GLSLANG_DATE "24-Dec-2015"
...@@ -2415,9 +2415,14 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali ...@@ -2415,9 +2415,14 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
return; 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"); 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) if (qualifier.storage == EvqVaryingIn && language == EShLangFragment)
error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage)); error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage));
else if (qualifier.storage == EvqVaryingOut && language == EShLangVertex && version == 300) else if (qualifier.storage == EvqVaryingOut && language == EShLangVertex && version == 300)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment