SPV: Don't decorate locations within an array, it doesn't make sense.
This fixes issue #360.
This commit is contained in:
50
Test/baseResults/spv.450.tesc.out
Executable file
50
Test/baseResults/spv.450.tesc.out
Executable file
@@ -0,0 +1,50 @@
|
||||
spv.450.tesc
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked tessellation control stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 17
|
||||
|
||||
Capability Tessellation
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TessellationControl 4 "main" 9 16
|
||||
ExecutionMode 4 OutputVertices 4
|
||||
Source GLSL 450
|
||||
Name 4 "main"
|
||||
Name 9 "patchOut"
|
||||
Name 10 "S"
|
||||
MemberName 10(S) 0 "sMem1"
|
||||
MemberName 10(S) 1 "sMem2"
|
||||
Name 11 "TheBlock"
|
||||
MemberName 11(TheBlock) 0 "bMem1"
|
||||
MemberName 11(TheBlock) 1 "bMem2"
|
||||
MemberName 11(TheBlock) 2 "s"
|
||||
Name 16 "tcBlock"
|
||||
Decorate 9(patchOut) Patch
|
||||
MemberDecorate 11(TheBlock) 0 Patch
|
||||
MemberDecorate 11(TheBlock) 1 Patch
|
||||
MemberDecorate 11(TheBlock) 2 Patch
|
||||
Decorate 11(TheBlock) Block
|
||||
Decorate 16(tcBlock) Location 12
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(patchOut): 8(ptr) Variable Output
|
||||
10(S): TypeStruct 6(float) 6(float)
|
||||
11(TheBlock): TypeStruct 6(float) 6(float) 10(S)
|
||||
12: TypeInt 32 0
|
||||
13: 12(int) Constant 2
|
||||
14: TypeArray 11(TheBlock) 13
|
||||
15: TypePointer Output 14
|
||||
16(tcBlock): 15(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
20
Test/spv.450.tesc
Normal file
20
Test/spv.450.tesc
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 450 core
|
||||
|
||||
layout(vertices = 4) out;
|
||||
|
||||
patch out vec4 patchOut;
|
||||
|
||||
struct S {
|
||||
float sMem1; // should not see a patch decoration
|
||||
float sMem2; // should not see a patch decoration
|
||||
};
|
||||
|
||||
layout(location = 12) patch out TheBlock {
|
||||
highp float bMem1; // should not see a location decoration
|
||||
highp float bMem2;
|
||||
S s; // should see a patch decoration
|
||||
} tcBlock[2];
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user