Updated glslang.

This commit is contained in:
Branimir Karadžić 2017-08-04 00:25:42 -07:00
parent e71fa8da7a
commit 2d126ea41d
51 changed files with 2755 additions and 2440 deletions

View File

@ -1745,6 +1745,20 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
atomic = true;
break;
case glslang::EOpAtomicCounterAdd:
case glslang::EOpAtomicCounterSubtract:
case glslang::EOpAtomicCounterMin:
case glslang::EOpAtomicCounterMax:
case glslang::EOpAtomicCounterAnd:
case glslang::EOpAtomicCounterOr:
case glslang::EOpAtomicCounterXor:
case glslang::EOpAtomicCounterExchange:
case glslang::EOpAtomicCounterCompSwap:
builder.addExtension("SPV_KHR_shader_atomic_counter_ops");
builder.addCapability(spv::CapabilityAtomicStorageOps);
atomic = true;
break;
default:
break;
}
@ -1815,6 +1829,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpAtomicXor:
case glslang::EOpAtomicExchange:
case glslang::EOpAtomicCompSwap:
case glslang::EOpAtomicCounterAdd:
case glslang::EOpAtomicCounterSubtract:
case glslang::EOpAtomicCounterMin:
case glslang::EOpAtomicCounterMax:
case glslang::EOpAtomicCounterAnd:
case glslang::EOpAtomicCounterOr:
case glslang::EOpAtomicCounterXor:
case glslang::EOpAtomicCounterExchange:
case glslang::EOpAtomicCounterCompSwap:
if (arg == 0)
lvalue = true;
break;
@ -4619,34 +4642,45 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
switch (op) {
case glslang::EOpAtomicAdd:
case glslang::EOpImageAtomicAdd:
case glslang::EOpAtomicCounterAdd:
opCode = spv::OpAtomicIAdd;
break;
case glslang::EOpAtomicCounterSubtract:
opCode = spv::OpAtomicISub;
break;
case glslang::EOpAtomicMin:
case glslang::EOpImageAtomicMin:
case glslang::EOpAtomicCounterMin:
opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin;
break;
case glslang::EOpAtomicMax:
case glslang::EOpImageAtomicMax:
case glslang::EOpAtomicCounterMax:
opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax;
break;
case glslang::EOpAtomicAnd:
case glslang::EOpImageAtomicAnd:
case glslang::EOpAtomicCounterAnd:
opCode = spv::OpAtomicAnd;
break;
case glslang::EOpAtomicOr:
case glslang::EOpImageAtomicOr:
case glslang::EOpAtomicCounterOr:
opCode = spv::OpAtomicOr;
break;
case glslang::EOpAtomicXor:
case glslang::EOpImageAtomicXor:
case glslang::EOpAtomicCounterXor:
opCode = spv::OpAtomicXor;
break;
case glslang::EOpAtomicExchange:
case glslang::EOpImageAtomicExchange:
case glslang::EOpAtomicCounterExchange:
opCode = spv::OpAtomicExchange;
break;
case glslang::EOpAtomicCompSwap:
case glslang::EOpImageAtomicCompSwap:
case glslang::EOpAtomicCounterCompSwap:
opCode = spv::OpAtomicCompareExchange;
break;
case glslang::EOpAtomicCounterIncrement:

View File

@ -846,6 +846,8 @@ const char* CapabilityString(int info)
case 5009: return "ImageGatherBiasLodAMD";
#endif
case 4445: return "AtomicStorageOps";
case 4447: return "SampleMaskPostDepthCoverage";
#ifdef NV_EXTENSIONS
case 5251: return "GeometryShaderPassthroughNV";

View File

@ -22,7 +22,27 @@ out SA outSA;
struct SS { float f; S s; };
out SS outSS;
layout(binding = 0) uniform atomic_uint aui;
uint ui;
void foo()
{
SS::f;
atomicCounterAdd(aui, ui); // ERROR, need 4.6
atomicCounterSubtract(aui, ui); // ERROR, need 4.6
atomicCounterMin(aui, ui); // ERROR, need 4.6
atomicCounterMax(aui, ui); // ERROR, need 4.6
atomicCounterAnd(aui, ui); // ERROR, need 4.6
atomicCounterOr(aui, ui); // ERROR, need 4.6
atomicCounterXor(aui, ui); // ERROR, need 4.6
atomicCounterExchange(aui, ui); // ERROR, need 4.6
atomicCounterCompSwap(aui, ui, ui); // ERROR, need 4.6
int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID; // ERROR, need 4.6
bool b1;
anyInvocation(b1); // ERROR, need 4.6
allInvocations(b1); // ERROR, need 4.6
allInvocationsEqual(b1); // ERROR, need 4.6
}
; // ERROR: no extraneous semicolons

17
3rdparty/glslang/Test/460.frag vendored Normal file
View File

@ -0,0 +1,17 @@
#version 460 core
struct S {
float f;
vec4 v;
};
in S s;
void main()
{
interpolateAtCentroid(s.v);
bool b1;
b1 = anyInvocation(b1);
b1 = allInvocations(b1);
b1 = allInvocationsEqual(b1);
}

15
3rdparty/glslang/Test/460.vert vendored Normal file
View File

@ -0,0 +1,15 @@
#version 460 core
int i;
; // extraneous semicolon okay
float f;;;
void main()
{
bool b1;
b1 = anyInvocation(b1);
b1 = allInvocations(b1);
b1 = allInvocationsEqual(b1);
}
;
;

View File

@ -1,8 +1,25 @@
450.vert
ERROR: 0:12: 'out' : cannot be bool
ERROR: 0:13: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
ERROR: 0:27: '::' : not supported
ERROR: 3 compilation errors. No code generated.
ERROR: 0:30: '::' : not supported
ERROR: 0:31: 'atomicCounterAdd' : no matching overloaded function found
ERROR: 0:32: 'atomicCounterSubtract' : no matching overloaded function found
ERROR: 0:33: 'atomicCounterMin' : no matching overloaded function found
ERROR: 0:34: 'atomicCounterMax' : no matching overloaded function found
ERROR: 0:35: 'atomicCounterAnd' : no matching overloaded function found
ERROR: 0:36: 'atomicCounterOr' : no matching overloaded function found
ERROR: 0:37: 'atomicCounterXor' : no matching overloaded function found
ERROR: 0:38: 'atomicCounterExchange' : no matching overloaded function found
ERROR: 0:39: 'atomicCounterCompSwap' : no matching overloaded function found
ERROR: 0:41: 'gl_BaseVertex' : undeclared identifier
ERROR: 0:41: 'gl_BaseInstance' : undeclared identifier
ERROR: 0:41: 'gl_DrawID' : undeclared identifier
ERROR: 0:41: '=' : cannot convert from ' temp float' to ' temp int'
ERROR: 0:44: 'anyInvocation' : no matching overloaded function found
ERROR: 0:45: 'allInvocations' : no matching overloaded function found
ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found
ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions
ERROR: 20 compilation errors. No code generated.
Shader version: 450
@ -20,8 +37,33 @@ ERROR: node is still EOpNull!
0:9 2 (const int)
0:9 Constant:
0:9 4.500000
0:25 Function Definition: foo( ( global void)
0:25 Function Parameters:
0:28 Function Definition: foo( ( global void)
0:28 Function Parameters:
0:? Sequence
0:31 Constant:
0:31 0.000000
0:32 Constant:
0:32 0.000000
0:33 Constant:
0:33 0.000000
0:34 Constant:
0:34 0.000000
0:35 Constant:
0:35 0.000000
0:36 Constant:
0:36 0.000000
0:37 Constant:
0:37 0.000000
0:38 Constant:
0:38 0.000000
0:39 Constant:
0:39 0.000000
0:44 Constant:
0:44 0.000000
0:45 Constant:
0:45 0.000000
0:46 Constant:
0:46 0.000000
0:? Linker Objects
0:? 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
0:? 'outb' ( smooth out bool)
@ -33,6 +75,8 @@ ERROR: node is still EOpNull!
0:? 'outsa' ( smooth out 4-element array of structure{ global float f})
0:? 'outSA' ( smooth out structure{ global 4-element array of float f})
0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s})
0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'ui' ( global uint)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
@ -66,6 +110,8 @@ ERROR: node is still EOpNull!
0:? 'outsa' ( smooth out 4-element array of structure{ global float f})
0:? 'outSA' ( smooth out structure{ global 4-element array of float f})
0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s})
0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint)
0:? 'ui' ( global uint)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)

View File

@ -0,0 +1,55 @@
460.frag
Shader version: 460
0:? Sequence
0:10 Function Definition: main( ( global void)
0:10 Function Parameters:
0:12 Sequence
0:12 interpolateAtCentroid ( global 4-component vector of float)
0:12 v: direct index for structure ( global 4-component vector of float)
0:12 's' ( smooth in structure{ global float f, global 4-component vector of float v})
0:12 Constant:
0:12 1 (const int)
0:14 move second child to first child ( temp bool)
0:14 'b1' ( temp bool)
0:14 anyInvocation ( global bool)
0:14 'b1' ( temp bool)
0:15 move second child to first child ( temp bool)
0:15 'b1' ( temp bool)
0:15 allInvocations ( global bool)
0:15 'b1' ( temp bool)
0:16 move second child to first child ( temp bool)
0:16 'b1' ( temp bool)
0:16 allInvocationsEqual ( global bool)
0:16 'b1' ( temp bool)
0:? Linker Objects
0:? 's' ( smooth in structure{ global float f, global 4-component vector of float v})
Linked fragment stage:
Shader version: 460
0:? Sequence
0:10 Function Definition: main( ( global void)
0:10 Function Parameters:
0:12 Sequence
0:12 interpolateAtCentroid ( global 4-component vector of float)
0:12 v: direct index for structure ( global 4-component vector of float)
0:12 's' ( smooth in structure{ global float f, global 4-component vector of float v})
0:12 Constant:
0:12 1 (const int)
0:14 move second child to first child ( temp bool)
0:14 'b1' ( temp bool)
0:14 anyInvocation ( global bool)
0:14 'b1' ( temp bool)
0:15 move second child to first child ( temp bool)
0:15 'b1' ( temp bool)
0:15 allInvocations ( global bool)
0:15 'b1' ( temp bool)
0:16 move second child to first child ( temp bool)
0:16 'b1' ( temp bool)
0:16 allInvocationsEqual ( global bool)
0:16 'b1' ( temp bool)
0:? Linker Objects
0:? 's' ( smooth in structure{ global float f, global 4-component vector of float v})

View File

@ -0,0 +1,51 @@
460.vert
Shader version: 460
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Linked vertex stage:
Shader version: 460
0:? Sequence
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)

View File

@ -128,7 +128,6 @@ Shader version: 500
0:11 Constant:
0:11 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Position' (layout( location=0) in 4-component vector of float)
0:? '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
@ -265,19 +264,18 @@ Shader version: 500
0:11 Constant:
0:11 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Position' (layout( location=0) in 4-component vector of float)
0:? '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 75
// Id's are bound by 72
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 43 50 56 74
EntryPoint Vertex 4 "main" 43 50 56
Source HLSL 500
Name 4 "main"
Name 8 "VS_INPUT"
@ -293,12 +291,9 @@ Shader version: 500
Name 46 "flattenTemp"
Name 50 "@entryPointOutput_Position"
Name 56 "@entryPointOutput_ClipRect"
Name 72 "VS_OUTPUT"
Name 74 "@entryPointOutput"
Decorate 43(Position) Location 0
Decorate 50(@entryPointOutput_Position) BuiltIn Position
Decorate 56(@entryPointOutput_ClipRect) BuiltIn ClipDistance
Decorate 74(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -335,9 +330,6 @@ Shader version: 500
59: TypePointer Output 6(float)
64: 16(int) Constant 2
68: 16(int) Constant 3
72(VS_OUTPUT): TypeStruct
73: TypePointer Output 72(VS_OUTPUT)
74(@entryPointOutput): 73(ptr) Variable Output
4(main): 2 Function None 3
5: Label
41(v): 40(ptr) Variable Function

View File

@ -152,7 +152,6 @@ Shader version: 500
0:11 Constant:
0:11 1 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Position' (layout( location=0) in 4-component vector of float)
0:? '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
@ -313,19 +312,18 @@ Shader version: 500
0:11 Constant:
0:11 1 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Position' (layout( location=0) in 4-component vector of float)
0:? '@entryPointOutput_ClipRect' ( out 4-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 76
// Id's are bound by 73
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 44 51 57 75
EntryPoint Vertex 4 "main" 44 51 57
Source HLSL 500
Name 4 "main"
Name 8 "VS_INPUT"
@ -341,12 +339,9 @@ Shader version: 500
Name 47 "flattenTemp"
Name 51 "@entryPointOutput_Position"
Name 57 "@entryPointOutput_ClipRect"
Name 73 "VS_OUTPUT"
Name 75 "@entryPointOutput"
Decorate 44(Position) Location 0
Decorate 51(@entryPointOutput_Position) BuiltIn Position
Decorate 57(@entryPointOutput_ClipRect) BuiltIn ClipDistance
Decorate 75(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -384,9 +379,6 @@ Shader version: 500
60: TypePointer Output 6(float)
65: 20(int) Constant 2
69: 20(int) Constant 3
73(VS_OUTPUT): TypeStruct
74: TypePointer Output 73(VS_OUTPUT)
75(@entryPointOutput): 74(ptr) Variable Output
4(main): 2 Function None 3
5: Label
42(v): 41(ptr) Variable Function

View File

@ -208,7 +208,6 @@ Shader version: 500
0:8 Constant:
0:8 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
@ -424,18 +423,17 @@ Shader version: 500
0:8 Constant:
0:8 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 89
// Id's are bound by 86
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 49 55 88
EntryPoint Vertex 4 "main" 49 55
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -447,11 +445,8 @@ Shader version: 500
Name 46 "flattenTemp"
Name 49 "@entryPointOutput_Position"
Name 55 "@entryPointOutput_clip1"
Name 86 "VS_OUTPUT"
Name 88 "@entryPointOutput"
Decorate 49(@entryPointOutput_Position) BuiltIn Position
Decorate 55(@entryPointOutput_clip1) BuiltIn ClipDistance
Decorate 88(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -491,9 +486,6 @@ Shader version: 500
74: 14(int) Constant 5
78: 14(int) Constant 6
82: 14(int) Constant 7
86(VS_OUTPUT): TypeStruct
87: TypePointer Output 86(VS_OUTPUT)
88(@entryPointOutput): 87(ptr) Variable Output
4(main): 2 Function None 3
5: Label
46(flattenTemp): 12(ptr) Variable Function

View File

@ -186,7 +186,6 @@ Shader version: 500
0:8 Constant:
0:8 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
@ -380,18 +379,17 @@ Shader version: 500
0:8 Constant:
0:8 3 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 8-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 84
// Id's are bound by 81
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 48 54 83
EntryPoint Vertex 4 "main" 48 54
Source HLSL 500
Name 4 "main"
Name 9 "VS_OUTPUT"
@ -403,11 +401,8 @@ Shader version: 500
Name 45 "flattenTemp"
Name 48 "@entryPointOutput_Position"
Name 54 "@entryPointOutput_clip1"
Name 81 "VS_OUTPUT"
Name 83 "@entryPointOutput"
Decorate 48(@entryPointOutput_Position) BuiltIn Position
Decorate 54(@entryPointOutput_clip1) BuiltIn ClipDistance
Decorate 83(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -446,9 +441,6 @@ Shader version: 500
69: 15(int) Constant 5
73: 15(int) Constant 6
77: 15(int) Constant 7
81(VS_OUTPUT): TypeStruct
82: TypePointer Output 81(VS_OUTPUT)
83(@entryPointOutput): 82(ptr) Variable Output
4(main): 2 Function None 3
5: Label
45(flattenTemp): 13(ptr) Variable Function

View File

@ -114,7 +114,6 @@ Shader version: 500
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
@ -236,18 +235,17 @@ Shader version: 500
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput_clip1' ( out 4-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 65
// Id's are bound by 62
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 41 47 64
EntryPoint Vertex 4 "main" 41 47
Source HLSL 500
Name 4 "main"
Name 9 "VS_OUTPUT"
@ -259,11 +257,8 @@ Shader version: 500
Name 38 "flattenTemp"
Name 41 "@entryPointOutput_Position"
Name 47 "@entryPointOutput_clip1"
Name 62 "VS_OUTPUT"
Name 64 "@entryPointOutput"
Decorate 41(@entryPointOutput_Position) BuiltIn Position
Decorate 47(@entryPointOutput_clip1) BuiltIn ClipDistance
Decorate 64(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -295,9 +290,6 @@ Shader version: 500
47(@entryPointOutput_clip1): 46(ptr) Variable Output
50: TypePointer Output 6(float)
58: 15(int) Constant 3
62(VS_OUTPUT): TypeStruct
63: TypePointer Output 62(VS_OUTPUT)
64(@entryPointOutput): 63(ptr) Variable Output
4(main): 2 Function None 3
5: Label
38(flattenTemp): 13(ptr) Variable Function

View File

@ -91,7 +91,6 @@ Shader version: 500
0:7 3 (const int)
0:? 'clip1' ( temp float)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'clip0' ( out 4-element array of float ClipDistance)
@ -190,18 +189,17 @@ Shader version: 500
0:7 3 (const int)
0:? 'clip1' ( temp float)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'clip0' ( out 4-element array of float ClipDistance)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 70
// Id's are bound by 67
Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 39 51 69
EntryPoint Vertex 4 "main" 39 51
Source HLSL 500
Name 4 "main"
Name 11 "VS_OUTPUT"
@ -216,11 +214,8 @@ Shader version: 500
Name 42 "param"
Name 43 "param"
Name 51 "clip0"
Name 67 "VS_OUTPUT"
Name 69 "@entryPointOutput"
Decorate 39(@entryPointOutput_Position) BuiltIn Position
Decorate 51(clip0) BuiltIn ClipDistance
Decorate 69(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -253,9 +248,6 @@ Shader version: 500
56: 19(int) Constant 1
60: 19(int) Constant 2
64: 19(int) Constant 3
67(VS_OUTPUT): TypeStruct
68: TypePointer Output 67(VS_OUTPUT)
69(@entryPointOutput): 68(ptr) Variable Output
4(main): 2 Function None 3
5: Label
40(clip0): 8(ptr) Variable Function

View File

@ -115,7 +115,6 @@ triangle order = none
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
0:? 'pcf_data' (layout( location=2) patch in structure{})
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
@ -239,18 +238,17 @@ triangle order = none
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
0:? 'pcf_data' (layout( location=2) patch in structure{})
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 91
// Id's are bound by 88
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main" 51 55 61 76 81 90
EntryPoint TessellationEvaluation 4 "main" 51 55 61 76 81
ExecutionMode 4 Triangles
Source HLSL 500
Name 4 "main"
@ -278,8 +276,6 @@ triangle order = none
Name 81 "@entryPointOutput"
Name 83 "param"
Name 85 "param"
Name 88 "pcf_in_t"
Name 90 "pcf_data"
Decorate 51(i) Location 0
Decorate 55(tesscoord) Patch
Decorate 55(tesscoord) BuiltIn TessCoord
@ -288,8 +284,6 @@ triangle order = none
Decorate 76(pcf_data_flInsideTessFactor) Patch
Decorate 76(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
Decorate 81(@entryPointOutput) Location 0
Decorate 90(pcf_data) Patch
Decorate 90(pcf_data) Location 2
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -330,9 +324,6 @@ triangle order = none
76(pcf_data_flInsideTessFactor): 75(ptr) Variable Input
80: TypePointer Output 17(gs_in_t)
81(@entryPointOutput): 80(ptr) Variable Output
88(pcf_in_t): TypeStruct
89: TypePointer Input 88(pcf_in_t)
90(pcf_data): 89(ptr) Variable Input
4(main): 2 Function None 3
5: Label
49(i): 48(ptr) Variable Function

View File

@ -112,7 +112,6 @@ triangle order = none
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
0:? 'pcf_data' (layout( location=2) patch in structure{})
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
@ -233,18 +232,17 @@ triangle order = none
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
0:? 'pcf_data' (layout( location=2) patch in structure{})
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 96
// Id's are bound by 93
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main" 54 58 67 81 86 95
EntryPoint TessellationEvaluation 4 "main" 54 58 67 81 86
ExecutionMode 4 Isolines
Source HLSL 500
Name 4 "main"
@ -272,8 +270,6 @@ triangle order = none
Name 86 "@entryPointOutput"
Name 88 "param"
Name 90 "param"
Name 93 "pcf_in_t"
Name 95 "pcf_data"
Decorate 54(i) Location 0
Decorate 58(tesscoord) Patch
Decorate 58(tesscoord) BuiltIn TessCoord
@ -282,8 +278,6 @@ triangle order = none
Decorate 81(pcf_data_flInsideTessFactor) Patch
Decorate 81(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
Decorate 86(@entryPointOutput) Location 0
Decorate 95(pcf_data) Patch
Decorate 95(pcf_data) Location 2
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -326,9 +320,6 @@ triangle order = none
81(pcf_data_flInsideTessFactor): 80(ptr) Variable Input
85: TypePointer Output 19(gs_in_t)
86(@entryPointOutput): 85(ptr) Variable Output
93(pcf_in_t): TypeStruct
94: TypePointer Input 93(pcf_in_t)
95(pcf_data): 94(ptr) Variable Input
4(main): 2 Function None 3
5: Label
52(i): 51(ptr) Variable Function

View File

@ -13,14 +13,13 @@ gl_FragCoord origin is upper left
0:? Sequence
0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{})
0:? 'i' (layout( location=0) in structure{})
0:? 'i' ( in structure{})
0:10 Sequence
0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-ps_in1; ( temp structure{})
0:? 'i' ( temp structure{})
0:? Linker Objects
0:? 'i' (layout( location=0) in structure{})
Linked fragment stage:
@ -40,14 +39,13 @@ gl_FragCoord origin is upper left
0:? Sequence
0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{})
0:? 'i' (layout( location=0) in structure{})
0:? 'i' ( in structure{})
0:10 Sequence
0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-ps_in1; ( temp structure{})
0:? 'i' ( temp structure{})
0:? Linker Objects
0:? 'i' (layout( location=0) in structure{})
// Module Version 10000
// Generated by (magic number): 80001
@ -69,7 +67,6 @@ gl_FragCoord origin is upper left
Name 20 "i"
Name 23 "@entryPointOutput"
Name 24 "param"
Decorate 20(i) Location 0
2: TypeVoid
3: TypeFunction 2
6(ps_in): TypeStruct

View File

@ -15,11 +15,10 @@ Shader version: 500
0:? 'i' ( temp structure{})
0:? 'i' ( in structure{})
0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-vs_in1; ( temp structure{})
0:? 'i' ( temp structure{})
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -41,11 +40,10 @@ Shader version: 500
0:? 'i' ( temp structure{})
0:? 'i' ( in structure{})
0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-vs_in1; ( temp structure{})
0:? 'i' ( temp structure{})
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
@ -66,7 +64,6 @@ Shader version: 500
Name 20 "i"
Name 23 "@entryPointOutput"
Name 24 "param"
Decorate 23(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6(vs_in): TypeStruct

View File

@ -105,7 +105,6 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -217,17 +216,16 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 129
// Id's are bound by 126
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 103 128
EntryPoint Vertex 4 "main" 103
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -256,8 +254,6 @@ Shader version: 500
Name 119 "g_tTex3df4"
Name 122 "g_tTex3di4"
Name 125 "g_tTex3du4"
Name 126 "VS_OUTPUT"
Name 128 "@entryPointOutput"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSamp) DescriptorSet 0
Decorate 20(g_sSamp) Binding 0
@ -277,7 +273,6 @@ Shader version: 500
Decorate 119(g_tTex3df4) DescriptorSet 0
Decorate 122(g_tTex3di4) DescriptorSet 0
Decorate 125(g_tTex3du4) DescriptorSet 0
Decorate 128(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -361,9 +356,6 @@ Shader version: 500
123: TypeImage 45(int) 3D sampled format:Unknown
124: TypePointer UniformConstant 123
125(g_tTex3du4): 124(ptr) Variable UniformConstant
126(VS_OUTPUT): TypeStruct
127: TypePointer Output 126(VS_OUTPUT)
128(@entryPointOutput): 127(ptr) Variable Output
4(main): 2 Function None 3
5: Label
104:8(VS_OUTPUT) FunctionCall 10(@main()

View File

@ -53,7 +53,6 @@ Shader version: 500
0:? Linker Objects
0:? 'g_sSamp' (layout( binding=0) uniform sampler)
0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D)
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -113,18 +112,17 @@ Shader version: 500
0:? Linker Objects
0:? 'g_sSamp' (layout( binding=0) uniform sampler)
0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D)
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 51
// Id's are bound by 48
Capability Shader
Capability Sampled1D
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 42 50
EntryPoint Vertex 4 "main" 42
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -138,14 +136,11 @@ Shader version: 500
Name 33 "vsout"
Name 42 "@entryPointOutput_Pos"
Name 47 "g_sSamp"
Name 48 "VS_OUTPUT"
Name 50 "@entryPointOutput"
Decorate 17(g_tTex1df4) DescriptorSet 0
Decorate 17(g_tTex1df4) Binding 0
Decorate 42(@entryPointOutput_Pos) BuiltIn Position
Decorate 47(g_sSamp) DescriptorSet 0
Decorate 47(g_sSamp) Binding 0
Decorate 50(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -169,9 +164,6 @@ Shader version: 500
45: TypeSampler
46: TypePointer UniformConstant 45
47(g_sSamp): 46(ptr) Variable UniformConstant
48(VS_OUTPUT): TypeStruct
49: TypePointer Output 48(VS_OUTPUT)
50(@entryPointOutput): 49(ptr) Variable Output
4(main): 2 Function None 3
5: Label
43:8(VS_OUTPUT) FunctionCall 10(@main()

View File

@ -107,7 +107,6 @@ vertex spacing = equal_spacing
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
0:? 'm_cpid' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
@ -222,17 +221,16 @@ vertex spacing = equal_spacing
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
0:? 'm_cpid' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 93
// Id's are bound by 90
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 40 44 48 66 72 92
EntryPoint TessellationControl 4 "main" 40 44 48 66 72
ExecutionMode 4 OutputVertices 4
ExecutionMode 4 Isolines
ExecutionMode 4 SpacingEqual
@ -262,16 +260,12 @@ vertex spacing = equal_spacing
Name 67 "param"
Name 72 "@patchConstantOutput_edges"
Name 82 "output"
Name 90 "HS_CONSTANT_OUT"
Name 92 "@patchConstantOutput"
Decorate 40(ip) Location 0
Decorate 44(m_cpid) BuiltIn InvocationId
Decorate 48(@entryPointOutput) Location 0
Decorate 66(pid) BuiltIn PrimitiveId
Decorate 72(@patchConstantOutput_edges) Patch
Decorate 72(@patchConstantOutput_edges) BuiltIn TessLevelOuter
Decorate 92(@patchConstantOutput) Patch
Decorate 92(@patchConstantOutput) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -313,9 +307,6 @@ vertex spacing = equal_spacing
78: 29(int) Constant 1
83: 6(float) Constant 1073741824
85: 6(float) Constant 1090519040
90(HS_CONSTANT_OUT): TypeStruct
91: TypePointer Output 90(HS_CONSTANT_OUT)
92(@patchConstantOutput): 91(ptr) Variable Output
4(main): 2 Function None 3
5: Label
38(ip): 12(ptr) Variable Function

View File

@ -105,7 +105,6 @@ vertex spacing = equal_spacing
0:? 'InvocationId' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? 'pos' ( in 4-component vector of float Position)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
@ -218,17 +217,16 @@ vertex spacing = equal_spacing
0:? 'InvocationId' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? 'pos' ( in 4-component vector of float Position)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 95
// Id's are bound by 92
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 42 46 48 64 66 74 94
EntryPoint TessellationControl 4 "main" 42 46 48 64 66 74
ExecutionMode 4 OutputVertices 4
ExecutionMode 4 Isolines
ExecutionMode 4 SpacingEqual
@ -258,8 +256,6 @@ vertex spacing = equal_spacing
Name 69 "param"
Name 74 "@patchConstantOutput_edges"
Name 84 "output"
Name 92 "HS_CONSTANT_OUT"
Name 94 "@patchConstantOutput"
Decorate 42(ip) Location 0
Decorate 46(@entryPointOutput) Location 0
Decorate 48(InvocationId) BuiltIn InvocationId
@ -267,8 +263,6 @@ vertex spacing = equal_spacing
Decorate 66(pos) BuiltIn Position
Decorate 74(@patchConstantOutput_edges) Patch
Decorate 74(@patchConstantOutput_edges) BuiltIn TessLevelOuter
Decorate 94(@patchConstantOutput) Patch
Decorate 94(@patchConstantOutput) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -314,9 +308,6 @@ vertex spacing = equal_spacing
80: 31(int) Constant 1
85: 6(float) Constant 1073741824
87: 6(float) Constant 1090519040
92(HS_CONSTANT_OUT): TypeStruct
93: TypePointer Output 92(HS_CONSTANT_OUT)
94(@patchConstantOutput): 93(ptr) Variable Output
4(main): 2 Function None 3
5: Label
40(ip): 12(ptr) Variable Function

View File

@ -105,7 +105,6 @@ vertex spacing = equal_spacing
0:? 'InvocationId' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? 'pos' ( in 4-component vector of float Position)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
@ -218,17 +217,16 @@ vertex spacing = equal_spacing
0:? 'InvocationId' ( in uint InvocationID)
0:? 'pid' ( in uint PrimitiveID)
0:? 'pos' ( in 4-component vector of float Position)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 95
// Id's are bound by 92
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 42 46 48 64 66 74 94
EntryPoint TessellationControl 4 "main" 42 46 48 64 66 74
ExecutionMode 4 OutputVertices 4
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingEqual
@ -259,8 +257,6 @@ vertex spacing = equal_spacing
Name 69 "param"
Name 74 "@patchConstantOutput_edges"
Name 84 "output"
Name 92 "HS_CONSTANT_OUT"
Name 94 "@patchConstantOutput"
Decorate 42(ip) Location 0
Decorate 46(@entryPointOutput) Location 0
Decorate 48(InvocationId) BuiltIn InvocationId
@ -268,8 +264,6 @@ vertex spacing = equal_spacing
Decorate 66(pos) BuiltIn Position
Decorate 74(@patchConstantOutput_edges) Patch
Decorate 74(@patchConstantOutput_edges) BuiltIn TessLevelOuter
Decorate 94(@patchConstantOutput) Patch
Decorate 94(@patchConstantOutput) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -315,9 +309,6 @@ vertex spacing = equal_spacing
80: 31(int) Constant 1
85: 6(float) Constant 1073741824
87: 6(float) Constant 1090519040
92(HS_CONSTANT_OUT): TypeStruct
93: TypePointer Output 92(HS_CONSTANT_OUT)
94(@patchConstantOutput): 93(ptr) Variable Output
4(main): 2 Function None 3
5: Label
40(ip): 12(ptr) Variable Function

View File

@ -192,7 +192,6 @@ triangle order = cw
0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
0:? 'cpid' ( in uint InvocationID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
@ -393,18 +392,17 @@ triangle order = cw
0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
0:? 'cpid' ( in uint InvocationID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 127
// Id's are bound by 124
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 41 45 48 94 108 126
EntryPoint TessellationControl 4 "main" 41 45 48 94 108
ExecutionMode 4 OutputVertices 3
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingFractionalOdd
@ -445,8 +443,6 @@ triangle order = cw
Name 94 "@patchConstantOutput_tfactor"
Name 108 "@patchConstantOutput_flInFactor"
Name 112 "o"
Name 124 "hs_pcf_t"
Name 126 "@patchConstantOutput"
Decorate 41(i) Location 0
Decorate 45(cpid) BuiltIn InvocationId
Decorate 48(@entryPointOutput) Location 0
@ -454,8 +450,6 @@ triangle order = cw
Decorate 94(@patchConstantOutput_tfactor) BuiltIn TessLevelOuter
Decorate 108(@patchConstantOutput_flInFactor) Patch
Decorate 108(@patchConstantOutput_flInFactor) BuiltIn TessLevelInner
Decorate 126(@patchConstantOutput) Patch
Decorate 126(@patchConstantOutput) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -501,9 +495,6 @@ triangle order = cw
107: TypePointer Output 106
108(@patchConstantOutput_flInFactor): 107(ptr) Variable Output
119: 6(float) Constant 1082130432
124(hs_pcf_t): TypeStruct
125: TypePointer Output 124(hs_pcf_t)
126(@patchConstantOutput): 125(ptr) Variable Output
4(main): 2 Function None 3
5: Label
39(i): 12(ptr) Variable Function

View File

@ -201,7 +201,6 @@ triangle order = cw
0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
0:? 'cpid' ( in uint InvocationID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
@ -411,18 +410,17 @@ triangle order = cw
0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float val})
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float val})
0:? 'cpid' ( in uint InvocationID)
0:? '@patchConstantOutput' (layout( location=1) patch out structure{})
0:? '@patchConstantOutput_tfactor' ( patch out 4-element array of float TessLevelOuter)
0:? '@patchConstantOutput_flInFactor' ( patch out 2-element array of float TessLevelInner)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 129
// Id's are bound by 126
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 42 46 49 96 110 128
EntryPoint TessellationControl 4 "main" 42 46 49 96 110
ExecutionMode 4 OutputVertices 3
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingFractionalOdd
@ -464,8 +462,6 @@ triangle order = cw
Name 96 "@patchConstantOutput_tfactor"
Name 110 "@patchConstantOutput_flInFactor"
Name 114 "o"
Name 126 "hs_pcf_t"
Name 128 "@patchConstantOutput"
Decorate 42(i) Location 0
Decorate 46(cpid) BuiltIn InvocationId
Decorate 49(@entryPointOutput) Location 0
@ -473,8 +469,6 @@ triangle order = cw
Decorate 96(@patchConstantOutput_tfactor) BuiltIn TessLevelOuter
Decorate 110(@patchConstantOutput_flInFactor) Patch
Decorate 110(@patchConstantOutput_flInFactor) BuiltIn TessLevelInner
Decorate 128(@patchConstantOutput) Patch
Decorate 128(@patchConstantOutput) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -520,9 +514,6 @@ triangle order = cw
109: TypePointer Output 108
110(@patchConstantOutput_flInFactor): 109(ptr) Variable Output
121: 6(float) Constant 1082130432
126(hs_pcf_t): TypeStruct
127: TypePointer Output 126(hs_pcf_t)
128(@patchConstantOutput): 127(ptr) Variable Output
4(main): 2 Function None 3
5: Label
40(i): 12(ptr) Variable Function

View File

@ -221,7 +221,6 @@ Shader version: 500
0:? 'g_tTexcdi4a' ( uniform itextureCubeArray)
0:? 'g_tTexcdu4a' ( uniform utextureCubeArray)
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -449,18 +448,17 @@ Shader version: 500
0:? 'g_tTexcdi4a' ( uniform itextureCubeArray)
0:? 'g_tTexcdu4a' ( uniform utextureCubeArray)
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 174
// Id's are bound by 171
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 129 173
EntryPoint Vertex 4 "main" 129
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -500,8 +498,6 @@ Shader version: 500
Name 164 "g_tTexcdf4a"
Name 167 "g_tTexcdi4a"
Name 170 "g_tTexcdu4a"
Name 171 "VS_OUTPUT"
Name 173 "@entryPointOutput"
Decorate 14(g_tTex1df4) DescriptorSet 0
Decorate 14(g_tTex1df4) Binding 0
MemberDecorate 20($Global) 0 Offset 0
@ -537,7 +533,6 @@ Shader version: 500
Decorate 164(g_tTexcdf4a) DescriptorSet 0
Decorate 167(g_tTexcdi4a) DescriptorSet 0
Decorate 170(g_tTexcdu4a) DescriptorSet 0
Decorate 173(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -636,9 +631,6 @@ Shader version: 500
168: TypeImage 24(int) Cube array sampled format:Unknown
169: TypePointer UniformConstant 168
170(g_tTexcdu4a): 169(ptr) Variable UniformConstant
171(VS_OUTPUT): TypeStruct
172: TypePointer Output 171(VS_OUTPUT)
173(@entryPointOutput): 172(ptr) Variable Output
4(main): 2 Function None 3
5: Label
130:8(VS_OUTPUT) FunctionCall 10(@main()

View File

@ -242,7 +242,6 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -491,17 +490,16 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 169
// Id's are bound by 166
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 162 168
EntryPoint Vertex 4 "main" 162
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -535,8 +533,6 @@ Shader version: 500
Name 153 "vsout"
Name 162 "@entryPointOutput_Pos"
Name 165 "g_tTex1df4a"
Name 166 "VS_OUTPUT"
Name 168 "@entryPointOutput"
Decorate 16(g_tTex1df4) DescriptorSet 0
Decorate 16(g_tTex1df4) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
@ -555,7 +551,6 @@ Shader version: 500
Decorate 162(@entryPointOutput_Pos) BuiltIn Position
Decorate 165(g_tTex1df4a) DescriptorSet 0
Decorate 165(g_tTex1df4a) Binding 1
Decorate 168(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -649,9 +644,6 @@ Shader version: 500
161: TypePointer Output 7(fvec4)
162(@entryPointOutput_Pos): 161(ptr) Variable Output
165(g_tTex1df4a): 15(ptr) Variable UniformConstant
166(VS_OUTPUT): TypeStruct
167: TypePointer Output 166(VS_OUTPUT)
168(@entryPointOutput): 167(ptr) Variable Output
4(main): 2 Function None 3
5: Label
163:8(VS_OUTPUT) FunctionCall 10(@main()

View File

@ -188,7 +188,6 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
Linked vertex stage:
@ -383,17 +382,16 @@ Shader version: 500
0:? 'g_tTexcdf4' ( uniform textureCube)
0:? 'g_tTexcdi4' ( uniform itextureCube)
0:? 'g_tTexcdu4' ( uniform utextureCube)
0:? '@entryPointOutput' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 165
// Id's are bound by 162
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 158 164
EntryPoint Vertex 4 "main" 158
Source HLSL 500
Name 4 "main"
Name 8 "VS_OUTPUT"
@ -427,8 +425,6 @@ Shader version: 500
Name 149 "vsout"
Name 158 "@entryPointOutput_Pos"
Name 161 "g_tTex1df4a"
Name 162 "VS_OUTPUT"
Name 164 "@entryPointOutput"
Decorate 16(g_tTex1df4) DescriptorSet 0
Decorate 16(g_tTex1df4) Binding 0
Decorate 20(g_sSamp) DescriptorSet 0
@ -447,7 +443,6 @@ Shader version: 500
Decorate 158(@entryPointOutput_Pos) BuiltIn Position
Decorate 161(g_tTex1df4a) DescriptorSet 0
Decorate 161(g_tTex1df4a) Binding 1
Decorate 164(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -537,9 +532,6 @@ Shader version: 500
157: TypePointer Output 7(fvec4)
158(@entryPointOutput_Pos): 157(ptr) Variable Output
161(g_tTex1df4a): 15(ptr) Variable UniformConstant
162(VS_OUTPUT): TypeStruct
163: TypePointer Output 162(VS_OUTPUT)
164(@entryPointOutput): 163(ptr) Variable Output
4(main): 2 Function None 3
5: Label
159:8(VS_OUTPUT) FunctionCall 10(@main()

View File

@ -34,42 +34,78 @@ output primitive = triangle_strip
0:? Constant:
0:? 5.000000
0:? 6.000000
0:30 Sequence
0:30 Sequence
0:30 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:30 pos: direct index for structure ( temp 4-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child ( temp 2-component vector of float)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:29 move second child to first child ( temp float)
0:29 direct index ( temp float)
0:29 m0_array: direct index for structure ( temp 2-element array of float)
0:29 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:29 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 2.300000
0:30 move second child to first child ( temp float)
0:30 direct index ( temp float)
0:30 m0_array: direct index for structure ( temp 2-element array of float)
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex ( temp void)
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 2.300000
0:31 move second child to first child ( temp int)
0:31 m1: direct index for structure ( temp int)
0:31 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:31 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 2 (const int)
0:33 Sequence
0:33 Sequence
0:33 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:33 pos: direct index for structure ( temp 4-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 0 (const int)
0:33 move second child to first child ( temp 2-component vector of float)
0:33 tc: direct index for structure ( temp 2-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:33 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 0 (const int)
0:33 tc: direct index for structure ( temp 2-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 1 (const int)
0:33 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 1 (const int)
0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 1 (const int)
0:33 EmitVertex ( temp void)
0:24 Function Definition: main( ( temp void)
0:24 Function Parameters:
0:? Sequence
@ -201,42 +237,78 @@ output primitive = triangle_strip
0:? Constant:
0:? 5.000000
0:? 6.000000
0:30 Sequence
0:30 Sequence
0:30 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:30 pos: direct index for structure ( temp 4-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child ( temp 2-component vector of float)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure ( temp 2-component vector of float)
0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:29 move second child to first child ( temp float)
0:29 direct index ( temp float)
0:29 m0_array: direct index for structure ( temp 2-element array of float)
0:29 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:29 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 2.300000
0:30 move second child to first child ( temp float)
0:30 direct index ( temp float)
0:30 m0_array: direct index for structure ( temp 2-element array of float)
0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex ( temp void)
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 2.300000
0:31 move second child to first child ( temp int)
0:31 m1: direct index for structure ( temp int)
0:31 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:31 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 2 (const int)
0:33 Sequence
0:33 Sequence
0:33 move second child to first child ( temp 4-component vector of float)
0:? 'ts_psIn_pos' ( out 4-component vector of float Position)
0:33 pos: direct index for structure ( temp 4-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 0 (const int)
0:33 move second child to first child ( temp 2-component vector of float)
0:33 tc: direct index for structure ( temp 2-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
0:33 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 0 (const int)
0:33 tc: direct index for structure ( temp 2-component vector of float)
0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 1 (const int)
0:33 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 1 (const int)
0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1})
0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:33 Constant:
0:33 1 (const int)
0:33 EmitVertex ( temp void)
0:24 Function Definition: main( ( temp void)
0:24 Function Parameters:
0:? Sequence
@ -331,12 +403,12 @@ output primitive = triangle_strip
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 99
// Id's are bound by 105
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 41 48 67 75
EntryPoint Geometry 4 "main" 48 55 74 82
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
@ -356,28 +428,28 @@ output primitive = triangle_strip
Name 21 "tin"
Name 22 "ts"
Name 25 "o"
Name 41 "ts_psIn_pos"
Name 44 "PS_IN"
MemberName 44(PS_IN) 0 "tc"
Name 45 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
Name 46 "GS_OUT"
MemberName 46(GS_OUT) 0 "psIn"
MemberName 46(GS_OUT) 1 "contains_no_builtin_io"
Name 48 "ts"
Name 64 "tin"
Name 67 "tin_pos"
Name 72 "PS_IN"
MemberName 72(PS_IN) 0 "tc"
Name 75 "tin"
Name 93 "ts"
Name 94 "param"
Name 96 "param"
Decorate 41(ts_psIn_pos) BuiltIn Position
Decorate 48(ts) Location 0
Decorate 67(tin_pos) BuiltIn Position
Decorate 75(tin) Location 0
Name 48 "ts_psIn_pos"
Name 51 "PS_IN"
MemberName 51(PS_IN) 0 "tc"
Name 52 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
Name 53 "GS_OUT"
MemberName 53(GS_OUT) 0 "psIn"
MemberName 53(GS_OUT) 1 "contains_no_builtin_io"
Name 55 "ts"
Name 71 "tin"
Name 74 "tin_pos"
Name 79 "PS_IN"
MemberName 79(PS_IN) 0 "tc"
Name 82 "tin"
Name 99 "ts"
Name 100 "param"
Name 102 "param"
Decorate 48(ts_psIn_pos) BuiltIn Position
Decorate 55(ts) Location 0
Decorate 74(tin_pos) BuiltIn Position
Decorate 82(tin) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -407,63 +479,66 @@ output primitive = triangle_strip
36: 6(float) Constant 1086324736
37: 8(fvec2) ConstantComposite 35 36
38: TypePointer Function 8(fvec2)
40: TypePointer Output 7(fvec4)
41(ts_psIn_pos): 40(ptr) Variable Output
44(PS_IN): TypeStruct 8(fvec2)
45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 15 16(int)
46(GS_OUT): TypeStruct 44(PS_IN) 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
47: TypePointer Output 46(GS_OUT)
48(ts): 47(ptr) Variable Output
51: TypePointer Output 8(fvec2)
53: TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
56: TypePointer Output 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
59: TypePointer Output 15
62: TypePointer Output 16(int)
65: TypeArray 7(fvec4) 11
66: TypePointer Input 65
67(tin_pos): 66(ptr) Variable Input
68: TypePointer Input 7(fvec4)
72(PS_IN): TypeStruct 8(fvec2)
73: TypeArray 72(PS_IN) 11
74: TypePointer Input 73
75(tin): 74(ptr) Variable Input
76: TypePointer Input 8(fvec2)
86: 16(int) Constant 2
40: 6(float) Constant 1075000115
41: TypePointer Function 6(float)
44: 16(int) Constant 2
45: TypePointer Function 16(int)
47: TypePointer Output 7(fvec4)
48(ts_psIn_pos): 47(ptr) Variable Output
51(PS_IN): TypeStruct 8(fvec2)
52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 15 16(int)
53(GS_OUT): TypeStruct 51(PS_IN) 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
54: TypePointer Output 53(GS_OUT)
55(ts): 54(ptr) Variable Output
58: TypePointer Output 8(fvec2)
60: TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
63: TypePointer Output 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
66: TypePointer Output 15
69: TypePointer Output 16(int)
72: TypeArray 7(fvec4) 11
73: TypePointer Input 72
74(tin_pos): 73(ptr) Variable Input
75: TypePointer Input 7(fvec4)
79(PS_IN): TypeStruct 8(fvec2)
80: TypeArray 79(PS_IN) 11
81: TypePointer Input 80
82(tin): 81(ptr) Variable Input
83: TypePointer Input 8(fvec2)
4(main): 2 Function None 3
5: Label
64(tin): 13(ptr) Variable Function
93(ts): 19(ptr) Variable Function
94(param): 13(ptr) Variable Function
96(param): 19(ptr) Variable Function
69: 68(ptr) AccessChain 67(tin_pos) 26
70: 7(fvec4) Load 69
71: 32(ptr) AccessChain 64(tin) 26 26
Store 71 70
77: 76(ptr) AccessChain 75(tin) 26 26
78: 8(fvec2) Load 77
79: 38(ptr) AccessChain 64(tin) 26 34
Store 79 78
80: 68(ptr) AccessChain 67(tin_pos) 34
81: 7(fvec4) Load 80
82: 32(ptr) AccessChain 64(tin) 34 26
Store 82 81
83: 76(ptr) AccessChain 75(tin) 34 26
84: 8(fvec2) Load 83
85: 38(ptr) AccessChain 64(tin) 34 34
Store 85 84
87: 68(ptr) AccessChain 67(tin_pos) 86
71(tin): 13(ptr) Variable Function
99(ts): 19(ptr) Variable Function
100(param): 13(ptr) Variable Function
102(param): 19(ptr) Variable Function
76: 75(ptr) AccessChain 74(tin_pos) 26
77: 7(fvec4) Load 76
78: 32(ptr) AccessChain 71(tin) 26 26
Store 78 77
84: 83(ptr) AccessChain 82(tin) 26 26
85: 8(fvec2) Load 84
86: 38(ptr) AccessChain 71(tin) 26 34
Store 86 85
87: 75(ptr) AccessChain 74(tin_pos) 34
88: 7(fvec4) Load 87
89: 32(ptr) AccessChain 64(tin) 86 26
89: 32(ptr) AccessChain 71(tin) 34 26
Store 89 88
90: 76(ptr) AccessChain 75(tin) 86 26
90: 83(ptr) AccessChain 82(tin) 34 26
91: 8(fvec2) Load 90
92: 38(ptr) AccessChain 64(tin) 86 34
92: 38(ptr) AccessChain 71(tin) 34 34
Store 92 91
95: 12 Load 64(tin)
Store 94(param) 95
97: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 94(param) 96(param)
98: 18(GS_OUT) Load 96(param)
Store 93(ts) 98
93: 75(ptr) AccessChain 74(tin_pos) 44
94: 7(fvec4) Load 93
95: 32(ptr) AccessChain 71(tin) 44 26
Store 95 94
96: 83(ptr) AccessChain 82(tin) 44 26
97: 8(fvec2) Load 96
98: 38(ptr) AccessChain 71(tin) 44 34
Store 98 97
101: 12 Load 71(tin)
Store 100(param) 101
103: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 100(param) 102(param)
104: 18(GS_OUT) Load 102(param)
Store 99(ts) 104
Return
FunctionEnd
23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20
@ -475,22 +550,28 @@ output primitive = triangle_strip
Store 33 31
39: 38(ptr) AccessChain 25(o) 26 34
Store 39 37
42: 32(ptr) AccessChain 25(o) 26 26
43: 7(fvec4) Load 42
Store 41(ts_psIn_pos) 43
49: 38(ptr) AccessChain 25(o) 26 34
50: 8(fvec2) Load 49
52: 51(ptr) AccessChain 48(ts) 26 26
Store 52 50
54: 53(ptr) AccessChain 25(o) 34
55:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 54
57: 56(ptr) AccessChain 48(ts) 34
58: 15 CompositeExtract 55 0
60: 59(ptr) AccessChain 57 26
Store 60 58
61: 16(int) CompositeExtract 55 1
63: 62(ptr) AccessChain 57 34
Store 63 61
42: 41(ptr) AccessChain 25(o) 34 26 26
Store 42 40
43: 41(ptr) AccessChain 25(o) 34 26 34
Store 43 40
46: 45(ptr) AccessChain 25(o) 34 34
Store 46 44
49: 32(ptr) AccessChain 25(o) 26 26
50: 7(fvec4) Load 49
Store 48(ts_psIn_pos) 50
56: 38(ptr) AccessChain 25(o) 26 34
57: 8(fvec2) Load 56
59: 58(ptr) AccessChain 55(ts) 26 26
Store 59 57
61: 60(ptr) AccessChain 25(o) 34
62:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 61
64: 63(ptr) AccessChain 55(ts) 34
65: 15 CompositeExtract 62 0
67: 66(ptr) AccessChain 64 26
Store 67 65
68: 16(int) CompositeExtract 62 1
70: 69(ptr) AccessChain 64 34
Store 70 68
EmitVertex
Return
FunctionEnd

View File

@ -90,8 +90,6 @@ output primitive = triangle_strip
0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos})
0:? 'ts' ( temp structure{ temp 4-component vector of float pos})
0:? Linker Objects
0:? 'i' (layout( location=0) in 3-element array of structure{})
0:? 'ts' (layout( location=0) out structure{})
Linked geometry stage:
@ -188,17 +186,15 @@ output primitive = triangle_strip
0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos})
0:? 'ts' ( temp structure{ temp 4-component vector of float pos})
0:? Linker Objects
0:? 'i' (layout( location=0) in 3-element array of structure{})
0:? 'ts' (layout( location=0) out structure{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 74
// Id's are bound by 67
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 40 49 70 73
EntryPoint Geometry 4 "main" 40 49
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
@ -220,14 +216,8 @@ output primitive = triangle_strip
Name 61 "ts"
Name 62 "param"
Name 64 "param"
Name 67 "PS_IN"
Name 70 "i"
Name 71 "GS_OUT"
Name 73 "ts"
Decorate 40(ts_pos) BuiltIn Position
Decorate 49(i_pos) BuiltIn Position
Decorate 70(i) Location 0
Decorate 73(ts) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -254,13 +244,6 @@ output primitive = triangle_strip
49(i_pos): 48(ptr) Variable Input
50: TypePointer Input 7(fvec4)
57: 20(int) Constant 2
67(PS_IN): TypeStruct
68: TypeArray 67(PS_IN) 10
69: TypePointer Input 68
70(i): 69(ptr) Variable Input
71(GS_OUT): TypeStruct
72: TypePointer Output 71(GS_OUT)
73(ts): 72(ptr) Variable Output
4(main): 2 Function None 3
5: Label
46(i): 12(ptr) Variable Function

View File

@ -42,7 +42,6 @@ Shader version: 500
0:16 Constant:
0:16 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Pos_in' (layout( location=0) in 4-component vector of float)
0:? 'Pos_loose' (layout( location=1) in 4-component vector of float)
@ -93,18 +92,17 @@ Shader version: 500
0:16 Constant:
0:16 0 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{})
0:? 'Pos_in' (layout( location=0) in 4-component vector of float)
0:? 'Pos_loose' (layout( location=1) in 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 48
// Id's are bound by 45
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 31 35 38 47
EntryPoint Vertex 4 "main" 31 35 38
Source HLSL 500
Name 4 "main"
Name 8 "VS_INPUT"
@ -122,12 +120,9 @@ Shader version: 500
Name 38 "@entryPointOutput_Pos"
Name 39 "param"
Name 41 "param"
Name 45 "VS_OUTPUT"
Name 47 "@entryPointOutput"
Decorate 31(Pos_in) Location 0
Decorate 35(Pos_loose) Location 1
Decorate 38(@entryPointOutput_Pos) BuiltIn Position
Decorate 47(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -145,9 +140,6 @@ Shader version: 500
35(Pos_loose): 30(ptr) Variable Input
37: TypePointer Output 7(fvec4)
38(@entryPointOutput_Pos): 37(ptr) Variable Output
45(VS_OUTPUT): TypeStruct
46: TypePointer Output 45(VS_OUTPUT)
47(@entryPointOutput): 46(ptr) Variable Output
4(main): 2 Function None 3
5: Label
29(vsin): 9(ptr) Variable Function

View File

@ -1,15 +1,15 @@
hlsl.structin.vert
Shader version: 500
0:? Sequence
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Parameters:
0:8 'd' ( in 4-component vector of float)
0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 'e' ( in 4-component vector of float)
0:? Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 b: direct index for structure ( temp 4-component vector of float)
0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 2 (const int)
0:11 add ( temp 4-component vector of float)
@ -18,31 +18,66 @@ Shader version: 500
0:11 add ( temp 4-component vector of float)
0:11 direct index ( temp 4-component vector of float)
0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 1 (const int)
0:11 direct index ( temp 4-component vector of float)
0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 Construct vec4 ( temp 4-component vector of float)
0:11 Convert uint to float ( temp float)
0:11 direct index ( temp uint)
0:11 coord: direct index for structure ( temp 2-component vector of uint)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 1 (const int)
0:11 direct index ( temp float)
0:11 coord: direct index for structure ( temp 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 1 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 'd' ( in 4-component vector of float)
0:11 'e' ( in 4-component vector of float)
0:13 Branch: Return with expression
0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:12 move second child to first child ( temp 4-component vector of float)
0:12 coord: direct index for structure ( temp 4-component vector of float)
0:12 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 1.000000
0:12 1.000000
0:12 1.000000
0:12 1.000000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 direct index ( temp 4-component vector of float)
0:13 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 Constant:
0:13 0 (const int)
0:13 Constant:
0:13 2.000000
0:13 2.000000
0:13 2.000000
0:13 2.000000
0:14 move second child to first child ( temp 4-component vector of float)
0:14 direct index ( temp 4-component vector of float)
0:14 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:14 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 1 (const int)
0:14 Constant:
0:14 3.000000
0:14 3.000000
0:14 3.000000
0:14 3.000000
0:16 Branch: Return with expression
0:16 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Definition: main( ( temp void)
0:8 Function Parameters:
0:? Sequence
@ -53,7 +88,7 @@ Shader version: 500
0:8 move second child to first child ( temp 4-component vector of float)
0:8 direct index ( temp 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
@ -62,21 +97,21 @@ Shader version: 500
0:8 move second child to first child ( temp 4-component vector of float)
0:8 direct index ( temp 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:8 move second child to first child ( temp 2-component vector of uint)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp 4-component vector of float)
0:8 coord: direct index for structure ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:? 'coord' (layout( location=3) in 2-component vector of uint)
0:? 'coord' (layout( location=3) in 4-component vector of float)
0:8 move second child to first child ( temp 4-component vector of float)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? 'b' (layout( location=4) in 4-component vector of float)
@ -84,47 +119,44 @@ Shader version: 500
0:? 'e' ( temp 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:? 'd' ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:? 'e' ( temp 4-component vector of float)
0:8 move second child to first child ( temp 2-element array of 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 move second child to first child ( temp 2-component vector of uint)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput_coord' ( out 4-component vector of float Position)
0:8 coord: direct index for structure ( temp 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 move second child to first child ( temp 4-component vector of float)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 b: direct index for structure ( smooth temp 4-component vector of float)
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:8 1 (const int)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:? 'd' (layout( location=0) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'coord' (layout( location=3) in 2-component vector of uint)
0:? 'coord' (layout( location=3) in 4-component vector of float)
0:? 'b' (layout( location=4) in 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float)
@ -134,15 +166,15 @@ Linked vertex stage:
Shader version: 500
0:? Sequence
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Parameters:
0:8 'd' ( in 4-component vector of float)
0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 'e' ( in 4-component vector of float)
0:? Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 b: direct index for structure ( temp 4-component vector of float)
0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 2 (const int)
0:11 add ( temp 4-component vector of float)
@ -151,31 +183,66 @@ Shader version: 500
0:11 add ( temp 4-component vector of float)
0:11 direct index ( temp 4-component vector of float)
0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 1 (const int)
0:11 direct index ( temp 4-component vector of float)
0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 Construct vec4 ( temp 4-component vector of float)
0:11 Convert uint to float ( temp float)
0:11 direct index ( temp uint)
0:11 coord: direct index for structure ( temp 2-component vector of uint)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 1 (const int)
0:11 direct index ( temp float)
0:11 coord: direct index for structure ( temp 4-component vector of float)
0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 1 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 'd' ( in 4-component vector of float)
0:11 'e' ( in 4-component vector of float)
0:13 Branch: Return with expression
0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:12 move second child to first child ( temp 4-component vector of float)
0:12 coord: direct index for structure ( temp 4-component vector of float)
0:12 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 1.000000
0:12 1.000000
0:12 1.000000
0:12 1.000000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 direct index ( temp 4-component vector of float)
0:13 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 Constant:
0:13 0 (const int)
0:13 Constant:
0:13 2.000000
0:13 2.000000
0:13 2.000000
0:13 2.000000
0:14 move second child to first child ( temp 4-component vector of float)
0:14 direct index ( temp 4-component vector of float)
0:14 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:14 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 1 (const int)
0:14 Constant:
0:14 3.000000
0:14 3.000000
0:14 3.000000
0:14 3.000000
0:16 Branch: Return with expression
0:16 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Definition: main( ( temp void)
0:8 Function Parameters:
0:? Sequence
@ -186,7 +253,7 @@ Shader version: 500
0:8 move second child to first child ( temp 4-component vector of float)
0:8 direct index ( temp 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
@ -195,21 +262,21 @@ Shader version: 500
0:8 move second child to first child ( temp 4-component vector of float)
0:8 direct index ( temp 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:8 move second child to first child ( temp 2-component vector of uint)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp 4-component vector of float)
0:8 coord: direct index for structure ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:? 'coord' (layout( location=3) in 2-component vector of uint)
0:? 'coord' (layout( location=3) in 4-component vector of float)
0:8 move second child to first child ( temp 4-component vector of float)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? 'b' (layout( location=4) in 4-component vector of float)
@ -217,94 +284,92 @@ Shader version: 500
0:? 'e' ( temp 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:? 'd' ( temp 4-component vector of float)
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:? 'e' ( temp 4-component vector of float)
0:8 move second child to first child ( temp 2-element array of 4-component vector of float)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 move second child to first child ( temp 2-component vector of uint)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 coord: direct index for structure ( temp 2-component vector of uint)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput_coord' ( out 4-component vector of float Position)
0:8 coord: direct index for structure ( temp 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 move second child to first child ( temp 4-component vector of float)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 b: direct index for structure ( smooth temp 4-component vector of float)
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:8 1 (const int)
0:8 b: direct index for structure ( temp 4-component vector of float)
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
0:? 'd' (layout( location=0) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'm[0]' (layout( location=1) in 4-component vector of float)
0:? 'm[1]' (layout( location=2) in 4-component vector of float)
0:? 'coord' (layout( location=3) in 2-component vector of uint)
0:? 'coord' (layout( location=3) in 4-component vector of float)
0:? 'b' (layout( location=4) in 4-component vector of float)
0:? 'e' (layout( location=5) in 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 92
// Id's are bound by 96
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 48 51 54 58 62 66 78
EntryPoint Vertex 4 "main" 55 58 61 64 67 71 83 90
Source HLSL 500
Name 4 "main"
Name 13 "VI"
MemberName 13(VI) 0 "m"
MemberName 13(VI) 1 "coord"
MemberName 13(VI) 2 "b"
Name 19 "@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;"
Name 16 "d"
Name 17 "vi"
Name 18 "e"
Name 21 "local"
Name 46 "d"
Name 48 "d"
Name 50 "vi"
Name 51 "m[0]"
Name 54 "m[1]"
Name 58 "coord"
Name 62 "b"
Name 65 "e"
Name 66 "e"
Name 68 "flattenTemp"
Name 69 "param"
Name 71 "param"
Name 73 "param"
Name 76 "VI"
MemberName 76(VI) 0 "m"
MemberName 76(VI) 1 "coord"
MemberName 76(VI) 2 "b"
Name 78 "@entryPointOutput"
Decorate 48(d) Location 0
Decorate 51(m[0]) Location 1
Decorate 54(m[1]) Location 2
Decorate 58(coord) Location 3
Decorate 62(b) Location 4
Decorate 66(e) Location 5
Decorate 78(@entryPointOutput) BuiltIn Position
Name 12 "VI"
MemberName 12(VI) 0 "m"
MemberName 12(VI) 1 "coord"
MemberName 12(VI) 2 "b"
Name 18 "@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;"
Name 15 "d"
Name 16 "vi"
Name 17 "e"
Name 20 "local"
Name 53 "d"
Name 55 "d"
Name 57 "vi"
Name 58 "m[0]"
Name 61 "m[1]"
Name 64 "coord"
Name 67 "b"
Name 70 "e"
Name 71 "e"
Name 73 "flattenTemp"
Name 74 "param"
Name 76 "param"
Name 78 "param"
Name 81 "VI"
MemberName 81(VI) 0 "m"
MemberName 81(VI) 1 "b"
Name 83 "@entryPointOutput"
Name 90 "@entryPointOutput_coord"
Decorate 55(d) Location 0
Decorate 58(m[0]) Location 1
Decorate 61(m[1]) Location 2
Decorate 64(coord) Location 3
Decorate 67(b) Location 4
Decorate 71(e) Location 5
Decorate 83(@entryPointOutput) Location 0
Decorate 90(@entryPointOutput_coord) BuiltIn Position
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -313,101 +378,108 @@ Shader version: 500
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 7(fvec4) 10
12: TypeVector 9(int) 2
13(VI): TypeStruct 11 12(ivec2) 7(fvec4)
14: TypePointer Function 13(VI)
15: TypeFunction 13(VI) 8(ptr) 14(ptr) 8(ptr)
22: TypeInt 32 1
23: 22(int) Constant 2
24: 22(int) Constant 0
25: 22(int) Constant 1
31: 9(int) Constant 0
32: TypePointer Function 9(int)
47: TypePointer Input 7(fvec4)
48(d): 47(ptr) Variable Input
51(m[0]): 47(ptr) Variable Input
54(m[1]): 47(ptr) Variable Input
57: TypePointer Input 12(ivec2)
58(coord): 57(ptr) Variable Input
60: TypePointer Function 12(ivec2)
62(b): 47(ptr) Variable Input
66(e): 47(ptr) Variable Input
76(VI): TypeStruct 11 12(ivec2) 7(fvec4)
77: TypePointer Output 76(VI)
78(@entryPointOutput): 77(ptr) Variable Output
79: TypePointer Function 11
82: TypePointer Output 11
86: TypePointer Output 12(ivec2)
90: TypePointer Output 7(fvec4)
12(VI): TypeStruct 11 7(fvec4) 7(fvec4)
13: TypePointer Function 12(VI)
14: TypeFunction 12(VI) 8(ptr) 13(ptr) 8(ptr)
21: TypeInt 32 1
22: 21(int) Constant 2
23: 21(int) Constant 0
24: 21(int) Constant 1
30: 9(int) Constant 0
31: TypePointer Function 6(float)
41: 6(float) Constant 1065353216
42: 7(fvec4) ConstantComposite 41 41 41 41
44: 6(float) Constant 1073741824
45: 7(fvec4) ConstantComposite 44 44 44 44
47: 6(float) Constant 1077936128
48: 7(fvec4) ConstantComposite 47 47 47 47
54: TypePointer Input 7(fvec4)
55(d): 54(ptr) Variable Input
58(m[0]): 54(ptr) Variable Input
61(m[1]): 54(ptr) Variable Input
64(coord): 54(ptr) Variable Input
67(b): 54(ptr) Variable Input
71(e): 54(ptr) Variable Input
81(VI): TypeStruct 11 7(fvec4)
82: TypePointer Output 81(VI)
83(@entryPointOutput): 82(ptr) Variable Output
84: TypePointer Function 11
87: TypePointer Output 11
89: TypePointer Output 7(fvec4)
90(@entryPointOutput_coord): 89(ptr) Variable Output
4(main): 2 Function None 3
5: Label
46(d): 8(ptr) Variable Function
50(vi): 14(ptr) Variable Function
65(e): 8(ptr) Variable Function
68(flattenTemp): 14(ptr) Variable Function
69(param): 8(ptr) Variable Function
71(param): 14(ptr) Variable Function
73(param): 8(ptr) Variable Function
49: 7(fvec4) Load 48(d)
Store 46(d) 49
52: 7(fvec4) Load 51(m[0])
53: 8(ptr) AccessChain 50(vi) 24 24
Store 53 52
55: 7(fvec4) Load 54(m[1])
56: 8(ptr) AccessChain 50(vi) 24 25
Store 56 55
59: 12(ivec2) Load 58(coord)
61: 60(ptr) AccessChain 50(vi) 25
Store 61 59
63: 7(fvec4) Load 62(b)
64: 8(ptr) AccessChain 50(vi) 23
Store 64 63
67: 7(fvec4) Load 66(e)
Store 65(e) 67
70: 7(fvec4) Load 46(d)
Store 69(param) 70
72: 13(VI) Load 50(vi)
Store 71(param) 72
74: 7(fvec4) Load 65(e)
Store 73(param) 74
75: 13(VI) FunctionCall 19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;) 69(param) 71(param) 73(param)
Store 68(flattenTemp) 75
80: 79(ptr) AccessChain 68(flattenTemp) 24
81: 11 Load 80
83: 82(ptr) AccessChain 78(@entryPointOutput) 24
Store 83 81
84: 60(ptr) AccessChain 68(flattenTemp) 25
85: 12(ivec2) Load 84
87: 86(ptr) AccessChain 78(@entryPointOutput) 25
Store 87 85
88: 8(ptr) AccessChain 68(flattenTemp) 23
89: 7(fvec4) Load 88
91: 90(ptr) AccessChain 78(@entryPointOutput) 23
Store 91 89
53(d): 8(ptr) Variable Function
57(vi): 13(ptr) Variable Function
70(e): 8(ptr) Variable Function
73(flattenTemp): 13(ptr) Variable Function
74(param): 8(ptr) Variable Function
76(param): 13(ptr) Variable Function
78(param): 8(ptr) Variable Function
56: 7(fvec4) Load 55(d)
Store 53(d) 56
59: 7(fvec4) Load 58(m[0])
60: 8(ptr) AccessChain 57(vi) 23 23
Store 60 59
62: 7(fvec4) Load 61(m[1])
63: 8(ptr) AccessChain 57(vi) 23 24
Store 63 62
65: 7(fvec4) Load 64(coord)
66: 8(ptr) AccessChain 57(vi) 24
Store 66 65
68: 7(fvec4) Load 67(b)
69: 8(ptr) AccessChain 57(vi) 22
Store 69 68
72: 7(fvec4) Load 71(e)
Store 70(e) 72
75: 7(fvec4) Load 53(d)
Store 74(param) 75
77: 12(VI) Load 57(vi)
Store 76(param) 77
79: 7(fvec4) Load 70(e)
Store 78(param) 79
80: 12(VI) FunctionCall 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;) 74(param) 76(param) 78(param)
Store 73(flattenTemp) 80
85: 84(ptr) AccessChain 73(flattenTemp) 23
86: 11 Load 85
88: 87(ptr) AccessChain 83(@entryPointOutput) 23
Store 88 86
91: 8(ptr) AccessChain 73(flattenTemp) 24
92: 7(fvec4) Load 91
Store 90(@entryPointOutput_coord) 92
93: 8(ptr) AccessChain 73(flattenTemp) 22
94: 7(fvec4) Load 93
95: 89(ptr) AccessChain 83(@entryPointOutput) 24
Store 95 94
Return
FunctionEnd
19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;): 13(VI) Function None 15
16(d): 8(ptr) FunctionParameter
17(vi): 14(ptr) FunctionParameter
18(e): 8(ptr) FunctionParameter
20: Label
21(local): 14(ptr) Variable Function
26: 8(ptr) AccessChain 17(vi) 24 25
27: 7(fvec4) Load 26
28: 8(ptr) AccessChain 17(vi) 24 24
29: 7(fvec4) Load 28
30: 7(fvec4) FAdd 27 29
33: 32(ptr) AccessChain 17(vi) 25 31
34: 9(int) Load 33
35: 6(float) ConvertUToF 34
36: 7(fvec4) CompositeConstruct 35 35 35 35
37: 7(fvec4) FAdd 30 36
38: 7(fvec4) Load 16(d)
18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;): 12(VI) Function None 14
15(d): 8(ptr) FunctionParameter
16(vi): 13(ptr) FunctionParameter
17(e): 8(ptr) FunctionParameter
19: Label
20(local): 13(ptr) Variable Function
25: 8(ptr) AccessChain 16(vi) 23 24
26: 7(fvec4) Load 25
27: 8(ptr) AccessChain 16(vi) 23 23
28: 7(fvec4) Load 27
29: 7(fvec4) FAdd 26 28
32: 31(ptr) AccessChain 16(vi) 24 30
33: 6(float) Load 32
34: 7(fvec4) CompositeConstruct 33 33 33 33
35: 7(fvec4) FAdd 29 34
36: 7(fvec4) Load 15(d)
37: 7(fvec4) FAdd 35 36
38: 7(fvec4) Load 17(e)
39: 7(fvec4) FAdd 37 38
40: 7(fvec4) Load 18(e)
41: 7(fvec4) FAdd 39 40
42: 8(ptr) AccessChain 21(local) 23
Store 42 41
43: 13(VI) Load 21(local)
ReturnValue 43
40: 8(ptr) AccessChain 20(local) 22
Store 40 39
43: 8(ptr) AccessChain 20(local) 24
Store 43 42
46: 8(ptr) AccessChain 20(local) 23 23
Store 46 45
49: 8(ptr) AccessChain 20(local) 23 24
Store 49 48
50: 12(VI) Load 20(local)
ReturnValue 50
FunctionEnd

View File

@ -0,0 +1,33 @@
spv.460.comp
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 15
Capability Shader
Capability SubgroupVoteKHR
Extension "SPV_KHR_subgroup_vote"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 460
Name 4 "main"
Name 8 "b1"
2: TypeVoid
3: TypeFunction 2
6: TypeBool
7: TypePointer Function 6(bool)
4(main): 2 Function None 3
5: Label
8(b1): 7(ptr) Variable Function
9: 6(bool) Load 8(b1)
10: 6(bool) SubgroupAnyKHR 9
Store 8(b1) 10
11: 6(bool) Load 8(b1)
12: 6(bool) SubgroupAllKHR 11
Store 8(b1) 12
13: 6(bool) Load 8(b1)
14: 6(bool) SubgroupAllEqualKHR 13
Store 8(b1) 14
Return
FunctionEnd

View File

@ -0,0 +1,51 @@
spv.460.frag
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 32
Capability Shader
Capability AtomicStorage
Capability AtomicStorageOps
Extension "SPV_KHR_shader_atomic_counter_ops"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft
Source GLSL 460
Name 4 "main"
Name 8 "aui"
Name 10 "ui"
Decorate 8(aui) Offset 0
Decorate 8(aui) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer AtomicCounter 6(int)
8(aui): 7(ptr) Variable AtomicCounter
9: TypePointer Private 6(int)
10(ui): 9(ptr) Variable Private
12: 6(int) Constant 1
13: 6(int) Constant 0
4(main): 2 Function None 3
5: Label
11: 6(int) Load 10(ui)
14: 6(int) AtomicIAdd 8(aui) 12 13 11
15: 6(int) Load 10(ui)
16: 6(int) AtomicISub 8(aui) 12 13 15
17: 6(int) Load 10(ui)
18: 6(int) AtomicUMin 8(aui) 12 13 17
19: 6(int) Load 10(ui)
20: 6(int) AtomicUMax 8(aui) 12 13 19
21: 6(int) Load 10(ui)
22: 6(int) AtomicAnd 8(aui) 12 13 21
23: 6(int) Load 10(ui)
24: 6(int) AtomicOr 8(aui) 12 13 23
25: 6(int) Load 10(ui)
26: 6(int) AtomicXor 8(aui) 12 13 25
27: 6(int) Load 10(ui)
28: 6(int) AtomicExchange 8(aui) 12 13 27
29: 6(int) Load 10(ui)
30: 6(int) Load 10(ui)
31: 6(int) AtomicCompareExchange 8(aui) 12 13 13 30 29
Return
FunctionEnd

View File

@ -0,0 +1,45 @@
spv.460.vert
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 20
Capability Shader
Capability DrawParameters
Extension "SPV_KHR_shader_draw_parameters"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 10 12 15 18 19
Source GLSL 460
Name 4 "main"
Name 8 "a"
Name 10 "gl_BaseVertex"
Name 12 "gl_BaseInstance"
Name 15 "gl_DrawID"
Name 18 "gl_VertexID"
Name 19 "gl_InstanceID"
Decorate 10(gl_BaseVertex) BuiltIn BaseVertex
Decorate 12(gl_BaseInstance) BuiltIn BaseInstance
Decorate 15(gl_DrawID) BuiltIn DrawIndex
Decorate 18(gl_VertexID) BuiltIn VertexId
Decorate 19(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: TypePointer Input 6(int)
10(gl_BaseVertex): 9(ptr) Variable Input
12(gl_BaseInstance): 9(ptr) Variable Input
15(gl_DrawID): 9(ptr) Variable Input
18(gl_VertexID): 9(ptr) Variable Input
19(gl_InstanceID): 9(ptr) Variable Input
4(main): 2 Function None 3
5: Label
8(a): 7(ptr) Variable Function
11: 6(int) Load 10(gl_BaseVertex)
13: 6(int) Load 12(gl_BaseInstance)
14: 6(int) IAdd 11 13
16: 6(int) Load 15(gl_DrawID)
17: 6(int) IAdd 14 16
Store 8(a) 17
Return
FunctionEnd

View File

@ -1,8 +1,8 @@
struct STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO
{
float m0_array[2];
int m1;
float m0_array[2] : mysemA;
int m1 : mysemB;
};
struct PS_IN
@ -26,6 +26,9 @@ void main(triangle PS_IN tin[3], inout TriangleStream <GS_OUT> ts )
o.psIn.pos = float4(1,2,3,4);
o.psIn.tc = float2(5,6);
o.contains_no_builtin_io.m0_array[0] = 2.3;
o.contains_no_builtin_io.m0_array[1] = 2.3;
o.contains_no_builtin_io.m1 = 2;
ts.Append(o);
}

View File

@ -1,14 +1,17 @@
struct VI {
float4 m[2];
uint2 coord;
linear float4 b;
float4 m[2] : mysemA;
float4 coord : SV_POSITION;
linear float4 b : mysemB;
};
VI main(float4 d, VI vi, float4 e) : SV_POSITION
VI main(float4 d : mysem, VI vi, float4 e : mysem)
{
VI local;
local.b = vi.m[1] + vi.m[0] + float4(vi.coord.x) + d + e;
local.b = vi.m[1] + vi.m[0] + (float4)vi.coord.x + d + e;
local.coord = (float4)1;
local.m[0] = (float4)2;
local.m[1] = (float4)3;
return local;
}

9
3rdparty/glslang/Test/spv.460.comp vendored Normal file
View File

@ -0,0 +1,9 @@
#version 460
void main()
{
bool b1;
b1 = anyInvocation(b1);
b1 = allInvocations(b1);
b1 = allInvocationsEqual(b1);
}

17
3rdparty/glslang/Test/spv.460.frag vendored Normal file
View File

@ -0,0 +1,17 @@
#version 460 core
layout(binding = 0) uniform atomic_uint aui;
uint ui;
void main()
{
atomicCounterAdd(aui, ui);
atomicCounterSubtract(aui, ui);
atomicCounterMin(aui, ui);
atomicCounterMax(aui, ui);
atomicCounterAnd(aui, ui);
atomicCounterOr(aui, ui);
atomicCounterXor(aui, ui);
atomicCounterExchange(aui, ui);
atomicCounterCompSwap(aui, ui, ui);
}

6
3rdparty/glslang/Test/spv.460.vert vendored Normal file
View File

@ -0,0 +1,6 @@
#version 460
void main()
{
int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID;
}

View File

@ -1370,15 +1370,12 @@ public:
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
virtual bool isBuiltInInterstageIO(EShLanguage language) const
{
return isPerVertexAndBuiltIn(language) || isLooseAndBuiltIn(language);
}
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
// Return true if this is an interstage IO builtin
virtual bool isPerVertexAndBuiltIn(EShLanguage language) const
// Return true if this is a per-vertex built-in
virtual bool isPerVertexBuiltIn(EShLanguage language) const
{
if (language == EShLangFragment)
if (getQualifier().builtIn == EbvNone || language == EShLangFragment)
return false;
// Any non-fragment stage
@ -1401,15 +1398,6 @@ public:
}
}
// Return true if this is a loose builtin
virtual bool isLooseAndBuiltIn(EShLanguage language) const
{
if (getQualifier().builtIn == EbvNone)
return false;
return !isPerVertexAndBuiltIn(language);
}
// return true if this type contains any subtype which satisfies the given predicate.
template <typename P>
bool contains(P predicate) const
@ -1451,10 +1439,10 @@ public:
return contains([](const TType* t) { return t->isOpaque(); } );
}
// Recursively checks if the type contains an interstage IO builtin
virtual bool containsBuiltInInterstageIO(EShLanguage language) const
// Recursively checks if the type contains a built-in variable
virtual bool containsBuiltIn() const
{
return contains([language](const TType* t) { return t->isBuiltInInterstageIO(language); } );
return contains([](const TType* t) { return t->isBuiltIn(); } );
}
virtual bool containsNonOpaque() const

View File

@ -420,6 +420,15 @@ enum TOperator {
EOpAtomicCounterIncrement,
EOpAtomicCounterDecrement,
EOpAtomicCounter,
EOpAtomicCounterAdd,
EOpAtomicCounterSubtract,
EOpAtomicCounterMin,
EOpAtomicCounterMax,
EOpAtomicCounterAnd,
EOpAtomicCounterOr,
EOpAtomicCounterXor,
EOpAtomicCounterExchange,
EOpAtomicCounterCompSwap,
EOpAny,
EOpAll,

View File

@ -1375,9 +1375,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
if ((profile != EEsProfile && version >= 300) ||
(profile == EEsProfile && version >= 310)) {
commonBuiltins.append(
"uint atomicCounterIncrement(atomic_uint x);"
"uint atomicCounterDecrement(atomic_uint x);"
"uint atomicCounter(atomic_uint x);"
"uint atomicCounterIncrement(atomic_uint);"
"uint atomicCounterDecrement(atomic_uint);"
"uint atomicCounter(atomic_uint);"
"\n");
}
if (profile != EEsProfile && version >= 460) {
commonBuiltins.append(
"uint atomicCounterAdd(atomic_uint, uint);"
"uint atomicCounterSubtract(atomic_uint, uint);"
"uint atomicCounterMin(atomic_uint, uint);"
"uint atomicCounterMax(atomic_uint, uint);"
"uint atomicCounterAnd(atomic_uint, uint);"
"uint atomicCounterOr(atomic_uint, uint);"
"uint atomicCounterXor(atomic_uint, uint);"
"uint atomicCounterExchange(atomic_uint, uint);"
"uint atomicCounterCompSwap(atomic_uint, uint, uint);"
"\n");
}
@ -1562,7 +1576,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
// GL_ARB_shader_group_vote
// GL_ARB_shader_group_vote
if (profile != EEsProfile && version >= 430) {
commonBuiltins.append(
"bool anyInvocationARB(bool);"
@ -1572,6 +1586,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
if (profile != EEsProfile && version >= 460) {
commonBuiltins.append(
"bool anyInvocation(bool);"
"bool allInvocations(bool);"
"bool allInvocationsEqual(bool);"
"\n");
}
#ifdef AMD_EXTENSIONS
// GL_AMD_shader_ballot
if (profile != EEsProfile && version >= 450) {
@ -3402,6 +3425,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in int gl_DrawIDARB;"
);
}
if (version >= 460) {
stageBuiltins[EShLangVertex].append(
"in int gl_BaseVertex;"
"in int gl_BaseInstance;"
"in int gl_DrawID;"
);
}
#ifdef NV_EXTENSIONS
if (version >= 450)
@ -5216,16 +5246,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
switch(language) {
case EShLangVertex:
if (profile != EEsProfile) {
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters);
symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters);
BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable);
BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable);
BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable);
}
if (profile != EEsProfile) {
if (version >= 440) {
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters);
symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters);
BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable);
BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable);
BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable);
}
if (version >= 460) {
BuiltInVariable("gl_BaseVertex", EbvBaseVertex, symbolTable);
BuiltInVariable("gl_BaseInstance", EbvBaseInstance, symbolTable);
BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable);
}
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot);
symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot);
@ -5249,9 +5282,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
// Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan
SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable);
symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote);
symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote);
symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote);
if (version >= 430) {
symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote);
symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote);
symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote);
}
}
#ifdef AMD_EXTENSIONS
@ -5909,6 +5944,18 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd);
symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
symbolTable.relateToOperator("atomicCounterMin", EOpAtomicCounterMin);
symbolTable.relateToOperator("atomicCounterMax", EOpAtomicCounterMax);
symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicCounterAnd);
symbolTable.relateToOperator("atomicCounterOr", EOpAtomicCounterOr);
symbolTable.relateToOperator("atomicCounterXor", EOpAtomicCounterXor);
symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicCounterExchange);
symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
}
symbolTable.relateToOperator("fma", EOpFma);
symbolTable.relateToOperator("frexp", EOpFrexp);
symbolTable.relateToOperator("ldexp", EOpLdexp);
@ -6051,10 +6098,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("readInvocationARB", EOpReadInvocation);
symbolTable.relateToOperator("readFirstInvocationARB", EOpReadFirstInvocation);
symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation);
symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations);
symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual);
if (version >= 430) {
symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation);
symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations);
symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual);
}
if (version >= 460) {
symbolTable.relateToOperator("anyInvocation", EOpAnyInvocation);
symbolTable.relateToOperator("allInvocations", EOpAllInvocations);
symbolTable.relateToOperator("allInvocationsEqual", EOpAllInvocationsEqual);
}
#ifdef AMD_EXTENSIONS
symbolTable.relateToOperator("minInvocationsAMD", EOpMinInvocations);
symbolTable.relateToOperator("maxInvocationsAMD", EOpMaxInvocations);

View File

@ -116,7 +116,7 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate&
// Local mapping functions for making arrays of symbol tables....
const int VersionCount = 16; // index range in MapVersionToIndex
const int VersionCount = 17; // index range in MapVersionToIndex
int MapVersionToIndex(int version)
{
@ -140,6 +140,7 @@ int MapVersionToIndex(int version)
case 450: index = 14; break;
case 500: index = 0; break; // HLSL
case 320: index = 15; break;
case 460: index = 16; break;
default: assert(0); break;
}
@ -516,6 +517,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
case 430: break;
case 440: break;
case 450: break;
case 460: break;
// unknown version
default:

View File

@ -2872,8 +2872,10 @@ translation_unit
parseContext.intermediate.setTreeRoot($$);
}
| translation_unit external_declaration {
$$ = parseContext.intermediate.growAggregate($1, $2);
parseContext.intermediate.setTreeRoot($$);
if ($2 != nullptr) {
$$ = parseContext.intermediate.growAggregate($1, $2);
parseContext.intermediate.setTreeRoot($$);
}
}
;
@ -2884,6 +2886,11 @@ external_declaration
| declaration {
$$ = $1;
}
| SEMICOLON {
parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon");
parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
$$ = nullptr;
}
;
function_definition

File diff suppressed because it is too large Load Diff

View File

@ -682,6 +682,16 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpAtomicExchange: out.debug << "AtomicExchange"; break;
case EOpAtomicCompSwap: out.debug << "AtomicCompSwap"; break;
case EOpAtomicCounterAdd: out.debug << "AtomicCounterAdd"; break;
case EOpAtomicCounterSubtract: out.debug << "AtomicCounterSubtract"; break;
case EOpAtomicCounterMin: out.debug << "AtomicCounterMin"; break;
case EOpAtomicCounterMax: out.debug << "AtomicCounterMax"; break;
case EOpAtomicCounterAnd: out.debug << "AtomicCounterAnd"; break;
case EOpAtomicCounterOr: out.debug << "AtomicCounterOr"; break;
case EOpAtomicCounterXor: out.debug << "AtomicCounterXor"; break;
case EOpAtomicCounterExchange: out.debug << "AtomicCounterExchange"; break;
case EOpAtomicCounterCompSwap: out.debug << "AtomicCounterCompSwap"; break;
case EOpImageQuerySize: out.debug << "imageQuerySize"; break;
case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break;
case EOpImageLoad: out.debug << "imageLoad"; break;

View File

@ -151,6 +151,8 @@ INSTANTIATE_TEST_CASE_P(
"450.tese",
"450.frag",
"450.comp",
"460.frag",
"460.vert",
"dce.frag",
"atomic_uint.frag",
"aggOps.frag",

View File

@ -360,6 +360,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
Glsl, CompileOpenGLToSpirvTest,
::testing::ValuesIn(std::vector<std::string>({
"spv.460.frag",
"spv.460.vert",
"spv.460.comp",
"spv.atomic.comp",
"spv.glFragColor.frag",
"spv.specConst.vert",

View File

@ -61,8 +61,6 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
forwardCompatible, messages),
annotationNestingLevel(0),
inputPatch(nullptr),
builtInIoIndex(nullptr),
builtInIoBase(nullptr),
nextInLocation(0), nextOutLocation(0),
sourceEntryPointName(sourceEntryPointName),
entryPointFunction(nullptr),
@ -842,15 +840,13 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
else {
// at least one of base and index is variable...
if (base->getAsSymbolNode() && (wasFlattened(base) || shouldFlatten(base->getType()))) {
if (base->getAsSymbolNode() && wasFlattened(base)) {
if (index->getQualifier().storage != EvqConst)
error(loc, "Invalid variable index to flattened array", base->getAsSymbolNode()->getName().c_str(), "");
result = flattenAccess(base, indexValue);
flattened = (result != base);
} else {
splitAccessArray(loc, base, index);
if (index->getQualifier().storage == EvqConst) {
if (base->getType().isImplicitlySizedArray())
updateImplicitArraySize(loc, base, indexValue);
@ -1060,21 +1056,15 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt
}
}
if (fieldFound) {
if (base->getAsSymbolNode() && (wasFlattened(base) || shouldFlatten(base->getType()))) {
if (base->getAsSymbolNode() && wasFlattened(base)) {
result = flattenAccess(base, member);
} else {
// Update the base and member to access if this was a split structure.
result = splitAccessStruct(loc, base, member);
fields = base->getType().getStruct();
if (result == nullptr) {
if (base->getType().getQualifier().storage == EvqConst)
result = intermediate.foldDereference(base, member, loc);
else {
TIntermTyped* index = intermediate.addConstantUnion(member, loc);
result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc);
result->setType(*(*fields)[member].type);
}
if (base->getType().getQualifier().storage == EvqConst)
result = intermediate.foldDereference(base, member, loc);
else {
TIntermTyped* index = intermediate.addConstantUnion(member, loc);
result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc);
result->setType(*(*fields)[member].type);
}
}
} else
@ -1109,40 +1099,17 @@ bool HlslParseContext::isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, co
return false;
}
// Split the type of the given node into two structs:
// 1. interstage IO
// 2. everything else
// IO members are put into the ioStruct. The type is modified to remove them.
void HlslParseContext::split(TIntermTyped* node)
{
if (node == nullptr)
return;
TIntermSymbol* symNode = node->getAsSymbolNode();
if (symNode == nullptr)
return;
// Create a new variable:
TType& splitType = split(*symNode->getType().clone(), symNode->getName());
splitIoVars[symNode->getId()] = makeInternalVariable(symNode->getName(), splitType);
}
// Split the type of the given variable into two structs:
// Split a type into
// 1. a struct of non-I/O members
// 2. a collection of flattened I/O variables
void HlslParseContext::split(const TVariable& variable)
{
const TType& type = variable.getType();
TString name = variable.getName();
// Create a new variable:
TType& splitType = split(*type.clone(), name);
TType& splitType = split(*variable.getType().clone(), variable.getName());
splitIoVars[variable.getUniqueId()] = makeInternalVariable(variable.getName(), splitType);
}
// Recursive implementation of split(const TVariable& variable).
// Recursive implementation of split().
// Returns reference to the modified type.
TType& HlslParseContext::split(TType& type, TString name, const TType* outerStructType)
{
@ -1159,39 +1126,32 @@ TType& HlslParseContext::split(TType& type, TString name, const TType* outerStru
// We can ignore arrayness: it's uninvolved.
if (type.isStruct()) {
TTypeList* userStructure = type.getWritableStruct();
for (auto ioType = userStructure->begin(); ioType != userStructure->end(); ) {
if (ioType->type->getQualifier().builtIn != EbvNone) {
// split out built-in interstage IO
const TType& memberType = *ioType->type;
TVariable* ioVar = makeInternalVariable(name + (name.empty() ? "" : "_") + memberType.getFieldName(),
memberType);
// Get iterator to (now at end) set of builtin interstage IO members
const auto firstIo = std::stable_partition(userStructure->begin(), userStructure->end(),
[this](const TTypeLoc& t) {
return !t.type->isBuiltInInterstageIO(language);
});
if (arraySizes)
ioVar->getWritableType().newArraySizes(*arraySizes);
// Move those to the builtin IO. However, we also propagate arrayness (just one level is handled
// now) to this variable.
for (auto ioType = firstIo; ioType != userStructure->end(); ++ioType) {
const TType& memberType = *ioType->type;
TVariable* ioVar = makeInternalVariable(name + (name.empty() ? "" : "_") + memberType.getFieldName(),
memberType);
fixBuiltInIoType(ioVar->getWritableType());
if (arraySizes)
ioVar->getWritableType().newArraySizes(*arraySizes);
interstageBuiltInIo[tInterstageIoData(memberType, *outerStructType)] = ioVar;
fixBuiltInIoType(ioVar->getWritableType());
// Merge qualifier from the user structure
mergeQualifiers(ioVar->getWritableType().getQualifier(), outerStructType->getQualifier());
interstageBuiltInIo[tInterstageIoData(memberType, *outerStructType)] = ioVar;
// Merge qualifier from the user structure
mergeQualifiers(ioVar->getWritableType().getQualifier(), outerStructType->getQualifier());
// Erase the IO vars from the user structure.
ioType = userStructure->erase(ioType);
} else {
split(*ioType->type,
name + (name.empty() ? "" : "_") + ioType->type->getFieldName(),
outerStructType);
++ioType;
}
}
// Erase the IO vars from the user structure.
userStructure->erase(firstIo, userStructure->end());
// Recurse further into the members.
for (unsigned int i = 0; i < userStructure->size(); ++i)
split(*(*userStructure)[i].type,
name + (name.empty() ? "" : "_") + (*userStructure)[i].type->getFieldName(),
outerStructType);
}
return type;
@ -1207,7 +1167,7 @@ bool HlslParseContext::shouldFlatten(const TType& type) const
}
// Top level variable flattening: construct data
void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable)
void HlslParseContext::flatten(const TVariable& variable)
{
const TType& type = variable.getType();
@ -1216,7 +1176,7 @@ void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable)
type.getQualifier().layoutLocation)));
// the item is a map pair, so first->second is the TFlattenData itself.
flatten(loc, variable, type, entry.first->second, "");
flatten(variable, type, entry.first->second, "");
}
// Recursively flatten the given variable at the provided type, building the flattenData as we go.
@ -1246,15 +1206,15 @@ void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable)
//
// so the 4th flattened member in traversal order is ours.
//
int HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable, const TType& type,
int HlslParseContext::flatten(const TVariable& variable, const TType& type,
TFlattenData& flattenData, TString name)
{
// If something is an arrayed struct, the array flattener will recursively call flatten()
// to then flatten the struct, so this is an "if else": we don't do both.
if (type.isArray())
return flattenArray(loc, variable, type, flattenData, name);
return flattenArray(variable, type, flattenData, name);
else if (type.isStruct())
return flattenStruct(loc, variable, type, flattenData, name);
return flattenStruct(variable, type, flattenData, name);
else {
assert(0); // should never happen
return -1;
@ -1263,8 +1223,7 @@ int HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable,
// Add a single flattened member to the flattened data being tracked for the composite
// Returns true for the final flattening level.
int HlslParseContext::addFlattenedMember(const TSourceLoc& loc,
const TVariable& variable, const TType& type, TFlattenData& flattenData,
int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& type, TFlattenData& flattenData,
const TString& memberName, bool track)
{
if (isFinalFlattening(type)) {
@ -1297,7 +1256,7 @@ int HlslParseContext::addFlattenedMember(const TSourceLoc& loc,
return static_cast<int>(flattenData.offsets.size())-1; // location of the member reference
} else {
// Further recursion required
return flatten(loc, variable, type, flattenData, memberName);
return flatten(variable, type, flattenData, memberName);
}
}
@ -1305,7 +1264,7 @@ int HlslParseContext::addFlattenedMember(const TSourceLoc& loc,
// equivalent set of individual variables.
//
// Assumes shouldFlatten() or equivalent was called first.
int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType& type,
int HlslParseContext::flattenStruct(const TVariable& variable, const TType& type,
TFlattenData& flattenData, TString name)
{
assert(type.isStruct());
@ -1321,7 +1280,7 @@ int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& vari
TType& dereferencedType = *members[member].type;
const TString memberName = name + (name.empty() ? "" : ".") + dereferencedType.getFieldName();
const int mpos = addFlattenedMember(loc, variable, dereferencedType, flattenData, memberName, false);
const int mpos = addFlattenedMember(variable, dereferencedType, flattenData, memberName, false);
flattenData.offsets[pos++] = mpos;
}
@ -1332,13 +1291,10 @@ int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& vari
// equivalent set of individual variables.
//
// Assumes shouldFlatten() or equivalent was called first.
int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType& type,
int HlslParseContext::flattenArray(const TVariable& variable, const TType& type,
TFlattenData& flattenData, TString name)
{
assert(type.isArray());
if (type.isImplicitlySizedArray())
error(loc, "cannot flatten implicitly sized array", variable.getName().c_str(), "");
assert(type.isArray() && !type.isImplicitlySizedArray());
const int size = type.getOuterArraySize();
const TType dereferencedType(type, 0);
@ -1354,7 +1310,7 @@ int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& varia
for (int element=0; element < size; ++element) {
char elementNumBuf[20]; // sufficient for MAXINT
snprintf(elementNumBuf, sizeof(elementNumBuf)-1, "[%d]", element);
const int mpos = addFlattenedMember(loc, variable, dereferencedType, flattenData,
const int mpos = addFlattenedMember(variable, dereferencedType, flattenData,
name + elementNumBuf, true);
flattenData.offsets[pos++] = mpos;
@ -1367,25 +1323,23 @@ int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& varia
bool HlslParseContext::wasFlattened(const TIntermTyped* node) const
{
return node != nullptr && node->getAsSymbolNode() != nullptr &&
wasFlattened(node->getAsSymbolNode()->getId());
wasFlattened(node->getAsSymbolNode()->getId());
}
// Return true if we have split this structure
bool HlslParseContext::wasSplit(const TIntermTyped* node) const
{
return node != nullptr && node->getAsSymbolNode() != nullptr &&
wasSplit(node->getAsSymbolNode()->getId());
wasSplit(node->getAsSymbolNode()->getId());
}
// Turn an access into an aggregate that was flattened to instead be
// an access to the individual variable the member was flattened to.
// Assumes shouldFlatten() or equivalent was called first.
// Also assumes that initFlattening() and finalizeFlattening() bracket the usage.
// Assumes wasFlattened() or equivalent was called first.
TIntermTyped* HlslParseContext::flattenAccess(TIntermTyped* base, int member)
{
const TType dereferencedType(base->getType(), member); // dereferenced type
const TIntermSymbol& symbolNode = *base->getAsSymbolNode();
TIntermTyped* flattened = flattenAccess(symbolNode.getId(), member, dereferencedType, symbolNode.getFlattenSubset());
return flattened ? flattened : base;
@ -1422,112 +1376,13 @@ TIntermTyped* HlslParseContext::flattenAccess(int uniqueId, int member, const TT
TVariable* HlslParseContext::getSplitIoVar(int id) const
{
const auto splitIoVar = splitIoVars.find(id);
if (splitIoVar == splitIoVars.end())
return nullptr;
return splitIoVar->second;
}
// Find and return the split IO TVariable for variable, or nullptr if none.
TVariable* HlslParseContext::getSplitIoVar(const TVariable* var) const
{
if (var == nullptr)
return nullptr;
return getSplitIoVar(var->getUniqueId());
}
// Find and return the split IO TVariable for symbol in this node, or nullptr if none.
TVariable* HlslParseContext::getSplitIoVar(const TIntermTyped* node) const
{
if (node == nullptr)
return nullptr;
const TIntermSymbol* symbolNode = node->getAsSymbolNode();
if (symbolNode == nullptr)
return nullptr;
return getSplitIoVar(symbolNode->getId());
}
// Remember the index used to dereference into this structure, in case it has to be moved to a
// split-off builtin IO member.
void HlslParseContext::splitAccessArray(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index)
{
const TVariable* splitIoVar = getSplitIoVar(base);
// Not a split structure
if (splitIoVar == nullptr)
return;
if (builtInIoBase) {
error(loc, "only one array dimension supported for builtIn IO variable", "", "");
return;
}
builtInIoBase = base;
builtInIoIndex = index;
}
// Turn an access into an struct that was split to instead be an
// access to either the modified structure, or a direct reference to
// one of the split member variables.
TIntermTyped* HlslParseContext::splitAccessStruct(const TSourceLoc& loc, TIntermTyped*& base, int& member)
{
// nothing to do
if (base == nullptr)
return nullptr;
// We have a pending bracket reference to an outer struct that we may want to move to an inner member.
if (builtInIoBase)
base = builtInIoBase;
const TVariable* splitIoVar = getSplitIoVar(base);
if (splitIoVar == nullptr)
return nullptr;
const TTypeList& members = *base->getType().getStruct();
const TType& memberType = *members[member].type;
if (memberType.isBuiltInInterstageIO(language)) {
// It's one of the interstage IO variables we split off.
TIntermTyped* builtIn = intermediate.addSymbol(*interstageBuiltInIo[tInterstageIoData(memberType,
base->getType())], loc);
// If there's an array reference to an outer split struct, we re-apply it here.
if (builtInIoIndex != nullptr) {
if (builtInIoIndex->getQualifier().storage == EvqConst)
builtIn = intermediate.addIndex(EOpIndexDirect, builtIn, builtInIoIndex, loc);
else
builtIn = intermediate.addIndex(EOpIndexIndirect, builtIn, builtInIoIndex, loc);
builtIn->setType(memberType);
builtInIoIndex = nullptr;
builtInIoBase = nullptr;
}
return builtIn;
} else {
// It's not an IO variable. Find the equivalent index into the new variable.
base = intermediate.addSymbol(*splitIoVar, loc);
int newMember = 0;
for (int m=0; m<member; ++m)
if (!members[m].type->isBuiltInInterstageIO(language))
++newMember;
member = newMember;
return nullptr;
}
}
// Pass through to base class after remembering builtin mappings.
// Pass through to base class after remembering built-in mappings.
void HlslParseContext::trackLinkage(TSymbol& symbol)
{
TBuiltInVariable biType = symbol.getType().getQualifier().builtIn;
@ -1539,7 +1394,7 @@ void HlslParseContext::trackLinkage(TSymbol& symbol)
}
// Returns true if the builtin is a clip or cull distance variable.
// Returns true if the built-in is a clip or cull distance variable.
bool HlslParseContext::isClipOrCullDistance(TBuiltInVariable builtIn)
{
return builtIn == EbvClipDistance || builtIn == EbvCullDistance;
@ -1604,26 +1459,28 @@ void HlslParseContext::assignToInterface(TVariable& variable)
{
const auto assignLocation = [&](TVariable& variable) {
TType& type = variable.getWritableType();
TQualifier& qualifier = type.getQualifier();
if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) {
if (qualifier.builtIn == EbvNone && !qualifier.hasLocation()) {
// Strip off the outer array dimension for those having an extra one.
int size;
if (type.isArray() && qualifier.isArrayedIo(language)) {
TType elementType(type, 0);
size = intermediate.computeTypeLocationSize(elementType);
} else
size = intermediate.computeTypeLocationSize(type);
if (!type.isStruct() || type.getStruct()->size() > 0) {
TQualifier& qualifier = type.getQualifier();
if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) {
if (qualifier.builtIn == EbvNone && !qualifier.hasLocation()) {
// Strip off the outer array dimension for those having an extra one.
int size;
if (type.isArray() && qualifier.isArrayedIo(language)) {
TType elementType(type, 0);
size = intermediate.computeTypeLocationSize(elementType);
} else
size = intermediate.computeTypeLocationSize(type);
if (qualifier.storage == EvqVaryingIn) {
variable.getWritableType().getQualifier().layoutLocation = nextInLocation;
nextInLocation += size;
} else {
variable.getWritableType().getQualifier().layoutLocation = nextOutLocation;
nextOutLocation += size;
if (qualifier.storage == EvqVaryingIn) {
variable.getWritableType().getQualifier().layoutLocation = nextInLocation;
nextInLocation += size;
} else {
variable.getWritableType().getQualifier().layoutLocation = nextOutLocation;
nextOutLocation += size;
}
}
trackLinkage(variable);
}
trackLinkage(variable);
}
};
@ -1632,7 +1489,7 @@ void HlslParseContext::assignToInterface(TVariable& variable)
for (auto member = memberList.begin(); member != memberList.end(); ++member)
assignLocation(**member);
} else if (wasSplit(variable.getUniqueId())) {
TVariable* splitIoVar = getSplitIoVar(&variable);
TVariable* splitIoVar = getSplitIoVar(variable.getUniqueId());
assignLocation(*splitIoVar);
} else {
assignLocation(variable);
@ -1694,7 +1551,7 @@ void HlslParseContext::addInterstageIoToLinkage()
TVariable* var = interstageBuiltInIo[io[idx]];
// Add the loose interstage IO to the linkage
if (var->getType().isLooseAndBuiltIn(language))
if (! var->getType().isPerVertexBuiltIn(language))
trackLinkage(*var);
}
}
@ -1793,7 +1650,7 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l
if (shouldFlatten(variable->getType())) {
// Expand the AST parameter nodes (but not the name mangling or symbol table view)
// for structures that need to be flattened.
flatten(loc, *variable);
flatten(*variable);
const TTypeList* structure = variable->getType().getStruct();
for (int mem = 0; mem < (int)structure->size(); ++mem) {
paramNodes = intermediate.growAggregate(paramNodes,
@ -2013,7 +1870,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
return language == EShLangTessEvaluation &&
type.contains([](const TType* t) {
return t->getQualifier().builtIn == EbvTessLevelOuter ||
t->getQualifier().builtIn == EbvTessLevelInner;
t->getQualifier().builtIn == EbvTessLevelInner;
});
};
@ -2043,9 +1900,9 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
// struct inputs to the vertex stage and outputs from the fragment stage must be flattened
if ((language == EShLangVertex && qualifier == EvqVaryingIn) ||
(language == EShLangFragment && qualifier == EvqVaryingOut))
flatten(loc, variable);
// Mixture of IO and non-IO must be split
else if (variable.getType().containsBuiltInInterstageIO(language))
flatten(variable);
// Structs containing built-ins must be split
else if (variable.getType().containsBuiltIn())
split(variable);
}
@ -2547,8 +2404,8 @@ TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc
// expected to then not exist for opaque types, because they will turn into aliases.
//
// Return a node that contains the non-aliased assignments that must continue to exist.
TIntermAggregate* HlslParseContext::flattenedInit(const TSourceLoc& loc, TIntermSymbol* symbol,
const TIntermAggregate& initializer)
TIntermAggregate* HlslParseContext::executeFlattenedInitializer(const TSourceLoc& loc, TIntermSymbol* symbol,
const TIntermAggregate& initializer)
{
TIntermAggregate* initList = nullptr;
// synthesize an access to each member, and then an assignment to it
@ -2591,7 +2448,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
// OK to do a single assign if both are split, or both are unsplit. But if one is and the other
// isn't, we fall back to a member-wise copy.
if (! isFlattenLeft && ! isFlattenRight && !isSplitLeft && !isSplitRight) {
if (!isFlattenLeft && !isFlattenRight && !isSplitLeft && !isSplitRight) {
// Clip and cull distance requires more processing. See comment above assignClipCullDistance.
if (isClipOrCullDistance(left->getType())) {
const int semanticId = left->getType().getQualifier().layoutLocation;
@ -2652,7 +2509,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
int memberIdx = 0;
// When dealing with split arrayed structures of builtins, the arrayness is moved to the extracted builtin
// When dealing with split arrayed structures of built-ins, the arrayness is moved to the extracted built-in
// variables, which is awkward when copying between split and unsplit structures. This variable tracks
// array indirections so they can be percolated from outer structs to inner variables.
std::vector <int> arrayElement;
@ -2663,26 +2520,19 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
const auto getMember = [&](bool isLeft, TIntermTyped* node, int member, TIntermTyped* splitNode, int splitMember)
-> TIntermTyped * {
const bool flattened = isLeft ? isFlattenLeft : isFlattenRight;
const bool split = isLeft ? isSplitLeft : isSplitRight;
TIntermTyped* subTree;
const bool flattened = isLeft ? isFlattenLeft : isFlattenRight;
const bool split = isLeft ? isSplitLeft : isSplitRight;
const TIntermTyped* outer = isLeft ? outerLeft : outerRight;
const TVector<TVariable*>& flatVariables = isLeft ? *leftVariables : *rightVariables;
// Index operator if it's an aggregate, else EOpNull
const TOperator op = node->getType().isArray() ? EOpIndexDirect :
node->getType().isStruct() ? EOpIndexDirectStruct : EOpNull;
const TType derefType(node->getType(), member);
if (split && derefType.isBuiltInInterstageIO(language)) {
// copy from interstage IO builtin if needed
if (split && derefType.isBuiltIn()) {
// copy from interstage IO built-in if needed
const TIntermTyped* outer = isLeft ? outerLeft : outerRight;
subTree = intermediate.addSymbol(*interstageBuiltInIo.find(
HlslParseContext::tInterstageIoData(derefType, outer->getType()))->second);
// Arrayness of builtIn symbols isn't handled by the normal recursion:
// it's been extracted and moved to the builtin.
// it's been extracted and moved to the built-in.
if (subTree->getType().isArray() && !arrayElement.empty()) {
const TType splitDerefType(subTree->getType(), arrayElement.back());
subTree = intermediate.addIndex(EOpIndexDirect, subTree,
@ -2690,14 +2540,19 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
subTree->setType(splitDerefType);
}
} else if (flattened && isFinalFlattening(derefType)) {
const TVector<TVariable*>& flatVariables = isLeft ? *leftVariables : *rightVariables;
subTree = intermediate.addSymbol(*flatVariables[memberIdx++]);
} else {
if (op == EOpNull) {
// Index operator if it's an aggregate, else EOpNull
const TOperator accessOp = node->getType().isArray() ? EOpIndexDirect
: node->getType().isStruct() ? EOpIndexDirectStruct
: EOpNull;
if (accessOp == EOpNull) {
subTree = splitNode;
} else {
subTree = intermediate.addIndex(accessOp, splitNode, intermediate.addConstantUnion(splitMember, loc),
loc);
const TType splitDerefType(splitNode->getType(), splitMember);
subTree = intermediate.addIndex(op, splitNode, intermediate.addConstantUnion(splitMember, loc), loc);
subTree->setType(splitDerefType);
}
}
@ -2719,7 +2574,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
// flattened, so have to do member-by-member assignment:
if (left->getType().isArray() || right->getType().isArray()) {
const int elementsL = left->getType().isArray() ? left->getType().getOuterArraySize() : 1;
const int elementsL = left->getType().isArray() ? left->getType().getOuterArraySize() : 1;
const int elementsR = right->getType().isArray() ? right->getType().getOuterArraySize() : 1;
// The arrays may not be the same size, e.g, if the size has been forced for EbvTessLevelInner or Outer.
@ -2770,10 +2625,10 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
: subRight;
if (isClipOrCullDistance(subSplitLeft->getType())) {
// Clip and cull distance builtin assignment is complex in its own right, and is handled in
// Clip and cull distance built-in assignment is complex in its own right, and is handled in
// a separate function dedicated to that task. See comment above assignClipCullDistance;
// Since all clip/cull semantics boil down to the same builtin type, we need to get the
// Since all clip/cull semantics boil down to the same built-in type, we need to get the
// semantic ID from the dereferenced type's layout location, to avoid an N-1 mapping.
const TType derefType(left->getType(), member);
const int semanticId = derefType.getQualifier().layoutLocation;
@ -2784,8 +2639,8 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
assignList = intermediate.growAggregate(assignList, clipCullAssign, loc);
} else if (!isFlattenLeft && !isFlattenRight &&
!typeL.containsBuiltInInterstageIO(language) &&
!typeR.containsBuiltInInterstageIO(language)) {
!typeL.containsBuiltIn() &&
!typeR.containsBuiltIn()) {
// If this is the final flattening (no nested types below to flatten)
// we'll copy the member, else recurse into the type hierarchy.
// However, if splitting the struct, that means we can copy a whole
@ -2801,8 +2656,8 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
traverse(subLeft, subRight, subSplitLeft, subSplitRight);
}
memberL += (typeL.isBuiltInInterstageIO(language) ? 0 : 1);
memberR += (typeR.isBuiltInInterstageIO(language) ? 0 : 1);
memberL += (typeL.isBuiltIn() ? 0 : 1);
memberR += (typeR.isBuiltIn() ? 0 : 1);
}
} else {
// Member copy
@ -2815,12 +2670,12 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
TIntermTyped* splitRight = right;
// If either left or right was a split structure, we must read or write it, but still have to
// parallel-recurse through the unsplit structure to identify the builtin IO vars.
// parallel-recurse through the unsplit structure to identify the built-in IO vars.
if (isSplitLeft)
splitLeft = intermediate.addSymbol(*getSplitIoVar(left), loc);
splitLeft = intermediate.addSymbol(*getSplitIoVar(left->getAsSymbolNode()->getId()), loc);
if (isSplitRight)
splitRight = intermediate.addSymbol(*getSplitIoVar(right), loc);
splitRight = intermediate.addSymbol(*getSplitIoVar(right->getAsSymbolNode()->getId()), loc);
// This makes the whole assignment, recursing through subtypes as needed.
traverse(left, right, splitLeft, splitRight);
@ -5030,7 +4885,7 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI
else
error(arg->getLoc(), "cannot convert input argument, argument", "", "%d", param);
} else {
if (wasFlattened(arg) || wasSplit(arg)) {
if (wasFlattened(arg)) {
// If both formal and calling arg are to be flattened, leave that to argument
// expansion, not conversion.
if (!shouldFlatten(*function[param].type)) {
@ -7166,7 +7021,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction
return nullptr;
}
// For builtins, we can convert across the arguments. This will happen in several steps:
// For built-ins, we can convert across the arguments. This will happen in several steps:
// Step 1: If there's an exact match, use it.
// Step 2a: Otherwise, get the operator from the best match and promote arguments:
// Step 2b: reconstruct the TFunction based on the new arg types
@ -7452,7 +7307,7 @@ TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TStr
return nullptr;
if (flattenVar)
flatten(loc, *symbol->getAsVariable());
flatten(*symbol->getAsVariable());
if (initializer == nullptr)
return nullptr;
@ -7619,7 +7474,7 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm
// handleAssign() will emit the initializer.
TIntermNode* initNode = nullptr;
if (flattened && intermSymbol->getType().containsOpaque())
return flattenedInit(loc, intermSymbol, *initializer->getAsAggregate());
return executeFlattenedInitializer(loc, intermSymbol, *initializer->getAsAggregate());
else {
initNode = handleAssign(loc, EOpAssign, intermSymbol, initializer);
if (initNode == nullptr)
@ -9047,7 +8902,7 @@ void HlslParseContext::addPatchConstantInvocation()
return;
}
// Look for builtin variables in a function's parameter list.
// Look for built-in variables in a function's parameter list.
const auto findBuiltIns = [&](const TFunction& function, std::set<tInterstageIoData>& builtIns) {
for (int p=0; p<function.getParamCount(); ++p) {
TStorageQualifier storage = function[p].type->getQualifier().storage;
@ -9063,7 +8918,7 @@ void HlslParseContext::addPatchConstantInvocation()
};
// If we synthesize a builtin interface variable, we must add it to the linkage.
// If we synthesize a built-in interface variable, we must add it to the linkage.
const auto addToLinkage = [&](const TType& type, const TString* name, TIntermSymbol** symbolNode) {
if (name == nullptr) {
error(loc, "unable to locate patch function parameter name", "", "");
@ -9094,11 +8949,11 @@ void HlslParseContext::addPatchConstantInvocation()
// We will perform these steps. Each is in a scoped block for separation: they could
// become separate functions to make addPatchConstantInvocation shorter.
//
// 1. Union the interfaces, and create builtins for anything present in the PCF and
// declared as a builtin variable that isn't present in the entry point's signature.
// 1. Union the interfaces, and create built-ins for anything present in the PCF and
// declared as a built-in variable that isn't present in the entry point's signature.
//
// 2. Synthesizes a call to the patchconstfunction using builtin variables from either main,
// or the ones we created. Matching is based on builtin type. We may use synthesized
// 2. Synthesizes a call to the patchconstfunction using built-in variables from either main,
// or the ones we created. Matching is based on built-in type. We may use synthesized
// variables from (1) above.
//
// 2B: Synthesize per control point invocations of wrapped entry point if the PCF requires them.
@ -9122,8 +8977,8 @@ void HlslParseContext::addPatchConstantInvocation()
// ================ Step 1A: Union Interfaces ================
// Our patch constant function.
{
std::set<tInterstageIoData> pcfBuiltIns; // patch constant function builtins
std::set<tInterstageIoData> epfBuiltIns; // entry point function builtins
std::set<tInterstageIoData> pcfBuiltIns; // patch constant function built-ins
std::set<tInterstageIoData> epfBuiltIns; // entry point function built-ins
assert(entryPointFunction);
assert(entryPointFunctionBody);
@ -9131,7 +8986,7 @@ void HlslParseContext::addPatchConstantInvocation()
findBuiltIns(patchConstantFunction, pcfBuiltIns);
findBuiltIns(*entryPointFunction, epfBuiltIns);
// Find the set of builtins in the PCF that are not present in the entry point.
// Find the set of built-ins in the PCF that are not present in the entry point.
std::set<tInterstageIoData> notInEntryPoint;
notInEntryPoint = pcfBuiltIns;
@ -9161,8 +9016,8 @@ void HlslParseContext::addPatchConstantInvocation()
if (storage == EvqConstReadOnly) // treated identically to input
storage = EvqIn;
// Presently, the only non-builtin we support is InputPatch, which is treated as
// a pseudo-builtin.
// Presently, the only non-built-in we support is InputPatch, which is treated as
// a pseudo-built-in.
if (biType == EbvInputPatch) {
builtInLinkageSymbols[biType] = inputPatch;
} else if (biType == EbvOutputPatch) {
@ -9207,13 +9062,13 @@ void HlslParseContext::addPatchConstantInvocation()
}
inputArg = intermediate.addSymbol(*perCtrlPtVar, loc);
} else {
// find which builtin it is
// find which built-in it is
const TBuiltInVariable biType = patchConstantFunction[p].getDeclaredBuiltIn();
inputArg = findLinkageSymbol(biType);
if (inputArg == nullptr) {
error(loc, "unable to find patch constant function builtin variable", "", "");
error(loc, "unable to find patch constant function built-in variable", "", "");
return;
}
}
@ -9328,7 +9183,7 @@ void HlslParseContext::addPatchConstantInvocation()
if (newLists != ioTypeMap.end())
outType.setStruct(newLists->second.output);
// Substitute the top level type's builtin type
// Substitute the top level type's built-in type
if (patchConstantFunction.getDeclaredBuiltInType() != EbvNone)
outType.getQualifier().builtIn = patchConstantFunction.getDeclaredBuiltInType();
@ -9337,7 +9192,7 @@ void HlslParseContext::addPatchConstantInvocation()
TVariable* pcfOutput = makeInternalVariable("@patchConstantOutput", outType);
pcfOutput->getWritableType().getQualifier().storage = EvqVaryingOut;
if (pcfOutput->getType().containsBuiltInInterstageIO(language))
if (pcfOutput->getType().containsBuiltIn())
split(*pcfOutput);
assignToInterface(*pcfOutput);

View File

@ -89,7 +89,7 @@ public:
void remapNonEntryPointIO(TFunction& function);
TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*);
void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg);
TIntermAggregate* flattenedInit(const TSourceLoc&, TIntermSymbol*, const TIntermAggregate&);
TIntermAggregate* executeFlattenedInitializer(const TSourceLoc&, TIntermSymbol*, const TIntermAggregate&);
TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right);
TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*);
@ -249,14 +249,11 @@ protected:
bool shouldFlatten(const TType&) const;
bool wasFlattened(const TIntermTyped* node) const;
bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); }
int addFlattenedMember(const TSourceLoc& loc, const TVariable&, const TType&, TFlattenData&, const TString& name, bool track);
int addFlattenedMember(const TVariable&, const TType&, TFlattenData&, const TString& name, bool track);
bool isFinalFlattening(const TType& type) const { return !(type.isStruct() || type.isArray()); }
// Structure splitting (splits interstage built-in types into its own struct)
TIntermTyped* splitAccessStruct(const TSourceLoc& loc, TIntermTyped*& base, int& member);
void splitAccessArray(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index);
TType& split(TType& type, TString name, const TType* outerStructType = nullptr);
void split(TIntermTyped*);
void split(const TVariable&);
bool wasSplit(const TIntermTyped* node) const;
bool wasSplit(int id) const { return splitIoVars.find(id) != splitIoVars.end(); }
@ -269,10 +266,10 @@ protected:
void fixBuiltInIoType(TType&);
void flatten(const TSourceLoc& loc, const TVariable& variable);
int flatten(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
void flatten(const TVariable& variable);
int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name);
bool hasUniform(const TQualifier& qualifier) const;
void clearUniform(TQualifier& qualifier);
@ -416,12 +413,6 @@ protected:
TMap<tInterstageIoData, TVariable*> interstageBuiltInIo; // individual builtin interstage IO vars, indexed by builtin type.
TVariable* inputPatch;
// We have to move array references to structs containing builtin interstage IO to the split variables.
// This is only handled for one level. This stores the index, because we'll need it in the future, since
// unlike normal array references, here the index happens before we discover what it applies to.
TIntermTyped* builtInIoIndex;
TIntermTyped* builtInIoBase;
unsigned int nextInLocation;
unsigned int nextOutLocation;