Updated glslang.

This commit is contained in:
Branimir Karadžić
2017-03-11 13:55:30 -08:00
parent 6e8cd93518
commit 5a07b3184a
55 changed files with 3567 additions and 1671 deletions

View File

@@ -2922,6 +2922,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
glslang::TCrackedTextureOp cracked;
node->crackTexture(sampler, cracked);
const bool isUnsignedResult =
node->getType().getBasicType() == glslang::EbtUint64 ||
node->getType().getBasicType() == glslang::EbtUint;
// Check for queries
if (cracked.query) {
// OpImageQueryLod works on a sampled image, for other queries the image has to be extracted first
@@ -2933,17 +2937,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
case glslang::EOpTextureQuerySize:
if (arguments.size() > 1) {
params.lod = arguments[1];
return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params);
return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params, isUnsignedResult);
} else
return builder.createTextureQueryCall(spv::OpImageQuerySize, params);
return builder.createTextureQueryCall(spv::OpImageQuerySize, params, isUnsignedResult);
case glslang::EOpImageQuerySamples:
case glslang::EOpTextureQuerySamples:
return builder.createTextureQueryCall(spv::OpImageQuerySamples, params);
return builder.createTextureQueryCall(spv::OpImageQuerySamples, params, isUnsignedResult);
case glslang::EOpTextureQueryLod:
params.coords = arguments[1];
return builder.createTextureQueryCall(spv::OpImageQueryLod, params);
return builder.createTextureQueryCall(spv::OpImageQueryLod, params, isUnsignedResult);
case glslang::EOpTextureQueryLevels:
return builder.createTextureQueryCall(spv::OpImageQueryLevels, params);
return builder.createTextureQueryCall(spv::OpImageQueryLevels, params, isUnsignedResult);
case glslang::EOpSparseTexelsResident:
return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]);
default:

View File

@@ -1662,7 +1662,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
}
// Comments in header
Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters)
Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters, bool isUnsignedResult)
{
// All these need a capability
addCapability(CapabilityImageQuery);
@@ -1695,10 +1695,12 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
}
if (isArrayedImageType(getImageType(parameters.sampler)))
++numComponents;
Id intType = isUnsignedResult ? makeUintType(32) : makeIntType(32);
if (numComponents == 1)
resultType = makeIntType(32);
resultType = intType;
else
resultType = makeVectorType(makeIntType(32), numComponents);
resultType = makeVectorType(intType, numComponents);
break;
}
@@ -1707,7 +1709,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
break;
case OpImageQueryLevels:
case OpImageQuerySamples:
resultType = makeIntType(32);
resultType = isUnsignedResult ? makeUintType(32) : makeIntType(32);
break;
default:
assert(0);

View File

@@ -335,7 +335,7 @@ public:
// Emit the OpTextureQuery* instruction that was passed in.
// Figure out the right return value and type, and return it.
Id createTextureQueryCall(Op, const TextureParameters&);
Id createTextureQueryCall(Op, const TextureParameters&, bool isUnsignedResult);
Id createSamplePositionCall(Decoration precision, Id, Id);

View File

@@ -1,5 +1,9 @@
#version 150 core
#ifndef GL_core_profile
# error standard macro GL_core_profile not defined
#endif
in vec4 iv4;
uniform float ps;

View File

@@ -21,3 +21,8 @@ struct SA { float f[4]; };
out SA outSA;
struct SS { float f; S s; };
out SS outSS;
void foo()
{
SS::f;
}

View File

@@ -1,44 +1,44 @@
150.vert
ERROR: 0:22: 'a' : cannot redeclare a user-block member array
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
ERROR: 0:3001: '#error' : line of this error should be 3001
ERROR: 2 compilation errors. No code generated.
Shader version: 150
ERROR: node is still EOpNull!
0:9 Function Definition: main( (global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child (temp 4-component vector of float)
0:11 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
0:11 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:11 Constant:
0:11 0 (const uint)
0:11 'iv4' (in 4-component vector of float)
0:12 move second child to first child (temp float)
0:12 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
0:12 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:12 Constant:
0:12 1 (const uint)
0:12 'ps' (uniform float)
0:13 move second child to first child (temp float)
0:13 direct index (temp float ClipDistance)
0:13 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
0:13 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:13 Constant:
0:13 2 (const uint)
0:13 Constant:
0:13 2 (const int)
0:13 direct index (temp float)
0:13 'iv4' (in 4-component vector of float)
0:13 Constant:
0:13 0 (const int)
0:14 move second child to first child (temp 4-component vector of float)
0:14 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
0:14 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:14 Constant:
0:14 3 (const uint)
0:14 'iv4' (in 4-component vector of float)
0:13 Function Definition: main( (global void)
0:13 Function Parameters:
0:15 Sequence
0:15 move second child to first child (temp 4-component vector of float)
0:15 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
0:15 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:15 Constant:
0:15 0 (const uint)
0:15 'iv4' (in 4-component vector of float)
0:16 move second child to first child (temp float)
0:16 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
0:16 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:16 Constant:
0:16 1 (const uint)
0:16 'ps' (uniform float)
0:17 move second child to first child (temp float)
0:17 direct index (temp float ClipDistance)
0:17 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
0:17 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:17 Constant:
0:17 2 (const uint)
0:17 Constant:
0:17 2 (const int)
0:17 direct index (temp float)
0:17 'iv4' (in 4-component vector of float)
0:17 Constant:
0:17 0 (const int)
0:18 move second child to first child (temp 4-component vector of float)
0:18 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
0:18 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:18 Constant:
0:18 3 (const uint)
0:18 'iv4' (in 4-component vector of float)
0:? Linker Objects
0:? 'iv4' (in 4-component vector of float)
0:? 'ps' (uniform float)
@@ -53,39 +53,39 @@ ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVerte
Shader version: 150
ERROR: node is still EOpNull!
0:9 Function Definition: main( (global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child (temp 4-component vector of float)
0:11 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
0:11 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:11 Constant:
0:11 0 (const uint)
0:11 'iv4' (in 4-component vector of float)
0:12 move second child to first child (temp float)
0:12 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
0:12 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:12 Constant:
0:12 1 (const uint)
0:12 'ps' (uniform float)
0:13 move second child to first child (temp float)
0:13 direct index (temp float ClipDistance)
0:13 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
0:13 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:13 Constant:
0:13 2 (const uint)
0:13 Constant:
0:13 2 (const int)
0:13 direct index (temp float)
0:13 'iv4' (in 4-component vector of float)
0:13 Constant:
0:13 0 (const int)
0:14 move second child to first child (temp 4-component vector of float)
0:14 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
0:14 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:14 Constant:
0:14 3 (const uint)
0:14 'iv4' (in 4-component vector of float)
0:13 Function Definition: main( (global void)
0:13 Function Parameters:
0:15 Sequence
0:15 move second child to first child (temp 4-component vector of float)
0:15 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
0:15 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:15 Constant:
0:15 0 (const uint)
0:15 'iv4' (in 4-component vector of float)
0:16 move second child to first child (temp float)
0:16 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
0:16 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:16 Constant:
0:16 1 (const uint)
0:16 'ps' (uniform float)
0:17 move second child to first child (temp float)
0:17 direct index (temp float ClipDistance)
0:17 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
0:17 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:17 Constant:
0:17 2 (const uint)
0:17 Constant:
0:17 2 (const int)
0:17 direct index (temp float)
0:17 'iv4' (in 4-component vector of float)
0:17 Constant:
0:17 0 (const int)
0:18 move second child to first child (temp 4-component vector of float)
0:18 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
0:18 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
0:18 Constant:
0:18 3 (const uint)
0:18 'iv4' (in 4-component vector of float)
0:? Linker Objects
0:? 'iv4' (in 4-component vector of float)
0:? 'ps' (uniform float)

View File

@@ -2,7 +2,8 @@
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
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: 2 compilation errors. No code generated.
ERROR: 0:27: '::' : not supported
ERROR: 3 compilation errors. No code generated.
Shader version: 450
@@ -20,6 +21,8 @@ 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:? Linker Objects
0:? 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
0:? 'outb' (smooth out bool)

View File

@@ -105,6 +105,7 @@ Shader version: 450
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:
@@ -216,16 +217,17 @@ Shader version: 450
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 126
// Id's are bound by 129
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 103
EntryPoint Vertex 4 "main" 103 128
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
@@ -253,6 +255,8 @@ Shader version: 450
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
@@ -272,6 +276,7 @@ Shader version: 450
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
@@ -355,6 +360,9 @@ Shader version: 450
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

@@ -0,0 +1,610 @@
hlsl.gathercmpRGBA.offset.dx10.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:38 Function Definition: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Parameters:
0:? Sequence
0:45 Sequence
0:45 move second child to first child (temp 4-component vector of float)
0:45 'txval001' (temp 4-component vector of float)
0:45 textureGatherOffset (temp 4-component vector of float)
0:45 Construct combined texture-sampler (temp sampler2DShadow)
0:45 'g_tTex2df4' (uniform texture2D)
0:45 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:45 Constant:
0:45 1 (const uint)
0:45 Constant:
0:45 0.750000
0:? Constant:
0:? 1 (const int)
0:? 0 (const int)
0:45 Constant:
0:45 0 (const int)
0:46 Sequence
0:46 move second child to first child (temp 4-component vector of int)
0:46 'txval011' (temp 4-component vector of int)
0:46 textureGatherOffset (temp 4-component vector of int)
0:46 Construct combined texture-sampler (temp isampler2DShadow)
0:46 'g_tTex2di4' (uniform itexture2D)
0:46 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:46 Constant:
0:46 1 (const uint)
0:46 Constant:
0:46 0.750000
0:? Constant:
0:? 1 (const int)
0:? -1 (const int)
0:46 Constant:
0:46 0 (const int)
0:47 Sequence
0:47 move second child to first child (temp 4-component vector of uint)
0:47 'txval021' (temp 4-component vector of uint)
0:47 textureGatherOffset (temp 4-component vector of uint)
0:47 Construct combined texture-sampler (temp usampler2DShadow)
0:47 'g_tTex2du4' (uniform utexture2D)
0:47 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:47 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:47 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:47 Constant:
0:47 1 (const uint)
0:47 Constant:
0:47 0.750000
0:? Constant:
0:? 1 (const int)
0:? 1 (const int)
0:47 Constant:
0:47 0 (const int)
0:49 Sequence
0:49 move second child to first child (temp 4-component vector of float)
0:49 'txval004' (temp 4-component vector of float)
0:49 textureGatherOffsets (temp 4-component vector of float)
0:49 Construct combined texture-sampler (temp sampler2DShadow)
0:49 'g_tTex2df4' (uniform texture2D)
0:49 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:49 Constant:
0:49 1 (const uint)
0:49 Constant:
0:49 0.750000
0:49 Constant:
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 Constant:
0:49 0 (const int)
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of int)
0:50 'txval014' (temp 4-component vector of int)
0:50 textureGatherOffsets (temp 4-component vector of int)
0:50 Construct combined texture-sampler (temp isampler2DShadow)
0:50 'g_tTex2di4' (uniform itexture2D)
0:50 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:50 Constant:
0:50 1 (const uint)
0:50 Constant:
0:50 0.750000
0:50 Constant:
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 Constant:
0:50 0 (const int)
0:51 Sequence
0:51 move second child to first child (temp 4-component vector of uint)
0:51 'txval024' (temp 4-component vector of uint)
0:51 textureGatherOffsets (temp 4-component vector of uint)
0:51 Construct combined texture-sampler (temp usampler2DShadow)
0:51 'g_tTex2du4' (uniform utexture2D)
0:51 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:51 Constant:
0:51 1 (const uint)
0:51 Constant:
0:51 0.750000
0:51 Constant:
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 Constant:
0:51 0 (const int)
0:114 move second child to first child (temp 4-component vector of float)
0:114 Color: direct index for structure (temp 4-component vector of float)
0:114 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:114 Constant:
0:114 0 (const int)
0:114 Constant:
0:114 1.000000
0:114 1.000000
0:114 1.000000
0:114 1.000000
0:115 move second child to first child (temp float)
0:115 Depth: direct index for structure (temp float)
0:115 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:115 Constant:
0:115 1 (const int)
0:115 Constant:
0:115 1.000000
0:117 Branch: Return with expression
0:117 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Definition: main( (temp void)
0:38 Function Parameters:
0:? Sequence
0:38 Sequence
0:38 move second child to first child (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Call: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:38 Color: direct index for structure (temp 4-component vector of float)
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Constant:
0:38 0 (const int)
0:38 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:38 Depth: direct index for structure (temp float)
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Constant:
0:38 1 (const int)
0:? Linker Objects
0:? 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'g_tTex1di4' (uniform itexture1D)
0:? 'g_tTex1du4' (uniform utexture1D)
0:? 'g_tTex2df4' (uniform texture2D)
0:? 'g_tTex2di4' (uniform itexture2D)
0:? 'g_tTex2du4' (uniform utexture2D)
0:? 'g_tTex3df4' (uniform texture3D)
0:? 'g_tTex3di4' (uniform itexture3D)
0:? 'g_tTex3du4' (uniform utexture3D)
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:? 'Depth' (out float FragDepth)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:38 Function Definition: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Parameters:
0:? Sequence
0:45 Sequence
0:45 move second child to first child (temp 4-component vector of float)
0:45 'txval001' (temp 4-component vector of float)
0:45 textureGatherOffset (temp 4-component vector of float)
0:45 Construct combined texture-sampler (temp sampler2DShadow)
0:45 'g_tTex2df4' (uniform texture2D)
0:45 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:45 Constant:
0:45 1 (const uint)
0:45 Constant:
0:45 0.750000
0:? Constant:
0:? 1 (const int)
0:? 0 (const int)
0:45 Constant:
0:45 0 (const int)
0:46 Sequence
0:46 move second child to first child (temp 4-component vector of int)
0:46 'txval011' (temp 4-component vector of int)
0:46 textureGatherOffset (temp 4-component vector of int)
0:46 Construct combined texture-sampler (temp isampler2DShadow)
0:46 'g_tTex2di4' (uniform itexture2D)
0:46 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:46 Constant:
0:46 1 (const uint)
0:46 Constant:
0:46 0.750000
0:? Constant:
0:? 1 (const int)
0:? -1 (const int)
0:46 Constant:
0:46 0 (const int)
0:47 Sequence
0:47 move second child to first child (temp 4-component vector of uint)
0:47 'txval021' (temp 4-component vector of uint)
0:47 textureGatherOffset (temp 4-component vector of uint)
0:47 Construct combined texture-sampler (temp usampler2DShadow)
0:47 'g_tTex2du4' (uniform utexture2D)
0:47 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:47 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:47 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:47 Constant:
0:47 1 (const uint)
0:47 Constant:
0:47 0.750000
0:? Constant:
0:? 1 (const int)
0:? 1 (const int)
0:47 Constant:
0:47 0 (const int)
0:49 Sequence
0:49 move second child to first child (temp 4-component vector of float)
0:49 'txval004' (temp 4-component vector of float)
0:49 textureGatherOffsets (temp 4-component vector of float)
0:49 Construct combined texture-sampler (temp sampler2DShadow)
0:49 'g_tTex2df4' (uniform texture2D)
0:49 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:49 Constant:
0:49 1 (const uint)
0:49 Constant:
0:49 0.750000
0:49 Constant:
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 1 (const int)
0:49 0 (const int)
0:49 Constant:
0:49 0 (const int)
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of int)
0:50 'txval014' (temp 4-component vector of int)
0:50 textureGatherOffsets (temp 4-component vector of int)
0:50 Construct combined texture-sampler (temp isampler2DShadow)
0:50 'g_tTex2di4' (uniform itexture2D)
0:50 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:50 Constant:
0:50 1 (const uint)
0:50 Constant:
0:50 0.750000
0:50 Constant:
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 1 (const int)
0:50 -1 (const int)
0:50 Constant:
0:50 0 (const int)
0:51 Sequence
0:51 move second child to first child (temp 4-component vector of uint)
0:51 'txval024' (temp 4-component vector of uint)
0:51 textureGatherOffsets (temp 4-component vector of uint)
0:51 Construct combined texture-sampler (temp usampler2DShadow)
0:51 'g_tTex2du4' (uniform utexture2D)
0:51 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of float)
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
0:51 Constant:
0:51 1 (const uint)
0:51 Constant:
0:51 0.750000
0:51 Constant:
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 1 (const int)
0:51 Constant:
0:51 0 (const int)
0:114 move second child to first child (temp 4-component vector of float)
0:114 Color: direct index for structure (temp 4-component vector of float)
0:114 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:114 Constant:
0:114 0 (const int)
0:114 Constant:
0:114 1.000000
0:114 1.000000
0:114 1.000000
0:114 1.000000
0:115 move second child to first child (temp float)
0:115 Depth: direct index for structure (temp float)
0:115 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:115 Constant:
0:115 1 (const int)
0:115 Constant:
0:115 1.000000
0:117 Branch: Return with expression
0:117 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Definition: main( (temp void)
0:38 Function Parameters:
0:? Sequence
0:38 Sequence
0:38 move second child to first child (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Function Call: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:38 Color: direct index for structure (temp 4-component vector of float)
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Constant:
0:38 0 (const int)
0:38 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:38 Depth: direct index for structure (temp float)
0:38 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
0:38 Constant:
0:38 1 (const int)
0:? Linker Objects
0:? 'g_sSampCmp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'g_tTex1di4' (uniform itexture1D)
0:? 'g_tTex1du4' (uniform utexture1D)
0:? 'g_tTex2df4' (uniform texture2D)
0:? 'g_tTex2di4' (uniform itexture2D)
0:? 'g_tTex2du4' (uniform utexture2D)
0:? 'g_tTex3df4' (uniform texture3D)
0:? 'g_tTex3di4' (uniform itexture3D)
0:? 'g_tTex3du4' (uniform utexture3D)
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:? 'Depth' (out float FragDepth)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 146
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 111 115
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "PS_OUTPUT"
MemberName 8(PS_OUTPUT) 0 "Color"
MemberName 8(PS_OUTPUT) 1 "Depth"
Name 10 "@main("
Name 13 "txval001"
Name 16 "g_tTex2df4"
Name 20 "g_sSampCmp"
Name 27 "$Global"
MemberName 27($Global) 0 "c1"
MemberName 27($Global) 1 "c2"
MemberName 27($Global) 2 "c3"
MemberName 27($Global) 3 "c4"
Name 29 ""
Name 42 "txval011"
Name 45 "g_tTex2di4"
Name 59 "txval021"
Name 62 "g_tTex2du4"
Name 72 "txval004"
Name 82 "txval014"
Name 90 "txval024"
Name 99 "psout"
Name 108 "flattenTemp"
Name 111 "Color"
Name 115 "Depth"
Name 120 "g_tTex1df4a"
Name 121 "g_tTex1df4"
Name 124 "g_tTex1di4"
Name 127 "g_tTex1du4"
Name 130 "g_tTex3df4"
Name 133 "g_tTex3di4"
Name 136 "g_tTex3du4"
Name 139 "g_tTexcdf4"
Name 142 "g_tTexcdi4"
Name 145 "g_tTexcdu4"
Decorate 16(g_tTex2df4) DescriptorSet 0
Decorate 20(g_sSampCmp) DescriptorSet 0
Decorate 20(g_sSampCmp) Binding 0
MemberDecorate 27($Global) 0 Offset 0
MemberDecorate 27($Global) 1 Offset 8
MemberDecorate 27($Global) 2 Offset 16
MemberDecorate 27($Global) 3 Offset 32
Decorate 27($Global) Block
Decorate 29 DescriptorSet 0
Decorate 45(g_tTex2di4) DescriptorSet 0
Decorate 62(g_tTex2du4) DescriptorSet 0
Decorate 111(Color) Location 0
Decorate 115(Depth) BuiltIn FragDepth
Decorate 120(g_tTex1df4a) DescriptorSet 0
Decorate 120(g_tTex1df4a) Binding 1
Decorate 121(g_tTex1df4) DescriptorSet 0
Decorate 121(g_tTex1df4) Binding 0
Decorate 124(g_tTex1di4) DescriptorSet 0
Decorate 127(g_tTex1du4) DescriptorSet 0
Decorate 130(g_tTex3df4) DescriptorSet 0
Decorate 133(g_tTex3di4) DescriptorSet 0
Decorate 136(g_tTex3du4) DescriptorSet 0
Decorate 139(g_tTexcdf4) DescriptorSet 0
Decorate 142(g_tTexcdi4) DescriptorSet 0
Decorate 145(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
9: TypeFunction 8(PS_OUTPUT)
12: TypePointer Function 7(fvec4)
14: TypeImage 6(float) 2D sampled format:Unknown
15: TypePointer UniformConstant 14
16(g_tTex2df4): 15(ptr) Variable UniformConstant
18: TypeSampler
19: TypePointer UniformConstant 18
20(g_sSampCmp): 19(ptr) Variable UniformConstant
22: TypeImage 6(float) 2D depth sampled format:Unknown
23: TypeSampledImage 22
25: TypeVector 6(float) 2
26: TypeVector 6(float) 3
27($Global): TypeStruct 6(float) 25(fvec2) 26(fvec3) 7(fvec4)
28: TypePointer Uniform 27($Global)
29: 28(ptr) Variable Uniform
30: TypeInt 32 1
31: 30(int) Constant 1
32: TypePointer Uniform 25(fvec2)
35: 6(float) Constant 1061158912
36: TypeVector 30(int) 2
37: 30(int) Constant 0
38: 36(ivec2) ConstantComposite 31 37
40: TypeVector 30(int) 4
41: TypePointer Function 40(ivec4)
43: TypeImage 30(int) 2D sampled format:Unknown
44: TypePointer UniformConstant 43
45(g_tTex2di4): 44(ptr) Variable UniformConstant
48: TypeImage 30(int) 2D depth sampled format:Unknown
49: TypeSampledImage 48
53: 30(int) Constant 4294967295
54: 36(ivec2) ConstantComposite 31 53
56: TypeInt 32 0
57: TypeVector 56(int) 4
58: TypePointer Function 57(ivec4)
60: TypeImage 56(int) 2D sampled format:Unknown
61: TypePointer UniformConstant 60
62(g_tTex2du4): 61(ptr) Variable UniformConstant
65: TypeImage 56(int) 2D depth sampled format:Unknown
66: TypeSampledImage 65
70: 36(ivec2) ConstantComposite 31 31
78: 56(int) Constant 4
79: TypeArray 36(ivec2) 78
80: 79 ConstantComposite 38 38 38 38
88: 79 ConstantComposite 54 54 54 54
96: 79 ConstantComposite 70 70 70 70
98: TypePointer Function 8(PS_OUTPUT)
100: 6(float) Constant 1065353216
101: 7(fvec4) ConstantComposite 100 100 100 100
103: TypePointer Function 6(float)
110: TypePointer Output 7(fvec4)
111(Color): 110(ptr) Variable Output
114: TypePointer Output 6(float)
115(Depth): 114(ptr) Variable Output
118: TypeImage 6(float) 1D sampled format:Unknown
119: TypePointer UniformConstant 118
120(g_tTex1df4a): 119(ptr) Variable UniformConstant
121(g_tTex1df4): 119(ptr) Variable UniformConstant
122: TypeImage 30(int) 1D sampled format:Unknown
123: TypePointer UniformConstant 122
124(g_tTex1di4): 123(ptr) Variable UniformConstant
125: TypeImage 56(int) 1D sampled format:Unknown
126: TypePointer UniformConstant 125
127(g_tTex1du4): 126(ptr) Variable UniformConstant
128: TypeImage 6(float) 3D sampled format:Unknown
129: TypePointer UniformConstant 128
130(g_tTex3df4): 129(ptr) Variable UniformConstant
131: TypeImage 30(int) 3D sampled format:Unknown
132: TypePointer UniformConstant 131
133(g_tTex3di4): 132(ptr) Variable UniformConstant
134: TypeImage 56(int) 3D sampled format:Unknown
135: TypePointer UniformConstant 134
136(g_tTex3du4): 135(ptr) Variable UniformConstant
137: TypeImage 6(float) Cube sampled format:Unknown
138: TypePointer UniformConstant 137
139(g_tTexcdf4): 138(ptr) Variable UniformConstant
140: TypeImage 30(int) Cube sampled format:Unknown
141: TypePointer UniformConstant 140
142(g_tTexcdi4): 141(ptr) Variable UniformConstant
143: TypeImage 56(int) Cube sampled format:Unknown
144: TypePointer UniformConstant 143
145(g_tTexcdu4): 144(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
108(flattenTemp): 98(ptr) Variable Function
109:8(PS_OUTPUT) FunctionCall 10(@main()
Store 108(flattenTemp) 109
112: 12(ptr) AccessChain 108(flattenTemp) 37
113: 7(fvec4) Load 112
Store 111(Color) 113
116: 103(ptr) AccessChain 108(flattenTemp) 31
117: 6(float) Load 116
Store 115(Depth) 117
Return
FunctionEnd
10(@main():8(PS_OUTPUT) Function None 9
11: Label
13(txval001): 12(ptr) Variable Function
42(txval011): 41(ptr) Variable Function
59(txval021): 58(ptr) Variable Function
72(txval004): 12(ptr) Variable Function
82(txval014): 41(ptr) Variable Function
90(txval024): 58(ptr) Variable Function
99(psout): 98(ptr) Variable Function
17: 14 Load 16(g_tTex2df4)
21: 18 Load 20(g_sSampCmp)
24: 23 SampledImage 17 21
33: 32(ptr) AccessChain 29 31
34: 25(fvec2) Load 33
39: 7(fvec4) ImageDrefGather 24 34 35 ConstOffset 38
Store 13(txval001) 39
46: 43 Load 45(g_tTex2di4)
47: 18 Load 20(g_sSampCmp)
50: 49 SampledImage 46 47
51: 32(ptr) AccessChain 29 31
52: 25(fvec2) Load 51
55: 40(ivec4) ImageDrefGather 50 52 35 ConstOffset 54
Store 42(txval011) 55
63: 60 Load 62(g_tTex2du4)
64: 18 Load 20(g_sSampCmp)
67: 66 SampledImage 63 64
68: 32(ptr) AccessChain 29 31
69: 25(fvec2) Load 68
71: 57(ivec4) ImageDrefGather 67 69 35 ConstOffset 70
Store 59(txval021) 71
73: 14 Load 16(g_tTex2df4)
74: 18 Load 20(g_sSampCmp)
75: 23 SampledImage 73 74
76: 32(ptr) AccessChain 29 31
77: 25(fvec2) Load 76
81: 7(fvec4) ImageDrefGather 75 77 35 ConstOffsets 80
Store 72(txval004) 81
83: 43 Load 45(g_tTex2di4)
84: 18 Load 20(g_sSampCmp)
85: 49 SampledImage 83 84
86: 32(ptr) AccessChain 29 31
87: 25(fvec2) Load 86
89: 40(ivec4) ImageDrefGather 85 87 35 ConstOffsets 88
Store 82(txval014) 89
91: 60 Load 62(g_tTex2du4)
92: 18 Load 20(g_sSampCmp)
93: 66 SampledImage 91 92
94: 32(ptr) AccessChain 29 31
95: 25(fvec2) Load 94
97: 57(ivec4) ImageDrefGather 93 95 35 ConstOffsets 96
Store 90(txval024) 97
102: 12(ptr) AccessChain 99(psout) 37
Store 102 101
104: 103(ptr) AccessChain 99(psout) 31
Store 104 100
105:8(PS_OUTPUT) Load 99(psout)
ReturnValue 105
FunctionEnd

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,8 @@ Shader version: 450
0:21 'sizeQueryTemp' (temp uint)
0:21 textureSize (temp uint)
0:21 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:21 Constant:
0:21 0 (const int)
0:21 move second child to first child (temp uint)
0:21 'WidthU' (temp uint)
0:21 'sizeQueryTemp' (temp uint)
@@ -51,6 +53,7 @@ Shader version: 450
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:
@@ -66,6 +69,8 @@ Shader version: 450
0:21 'sizeQueryTemp' (temp uint)
0:21 textureSize (temp uint)
0:21 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:21 Constant:
0:21 0 (const int)
0:21 move second child to first child (temp uint)
0:21 'WidthU' (temp uint)
0:21 'sizeQueryTemp' (temp uint)
@@ -108,34 +113,38 @@ Shader version: 450
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 48
// Id's are bound by 51
Capability Shader
Capability Sampled1D
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 42
EntryPoint Vertex 4 "main" 42 50
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
Name 10 "@main("
Name 14 "sizeQueryTemp"
Name 17 "g_tTex1df4"
Name 21 "WidthU"
Name 23 "sizeQueryTemp"
Name 28 "NumberOfLevelsU"
Name 32 "vsout"
Name 22 "WidthU"
Name 24 "sizeQueryTemp"
Name 29 "NumberOfLevelsU"
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
@@ -148,9 +157,9 @@ Shader version: 450
16: TypePointer UniformConstant 15
17(g_tTex1df4): 16(ptr) Variable UniformConstant
19: TypeInt 32 1
25: 12(int) Constant 6
31: TypePointer Function 8(VS_OUTPUT)
33: 19(int) Constant 0
20: 19(int) Constant 0
26: 12(int) Constant 6
32: TypePointer Function 8(VS_OUTPUT)
34: 6(float) Constant 0
35: 7(fvec4) ConstantComposite 34 34 34 34
36: TypePointer Function 7(fvec4)
@@ -159,6 +168,9 @@ Shader version: 450
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()
@@ -169,25 +181,25 @@ Shader version: 450
10(@main():8(VS_OUTPUT) Function None 9
11: Label
14(sizeQueryTemp): 13(ptr) Variable Function
21(WidthU): 13(ptr) Variable Function
23(sizeQueryTemp): 13(ptr) Variable Function
28(NumberOfLevelsU): 13(ptr) Variable Function
32(vsout): 31(ptr) Variable Function
22(WidthU): 13(ptr) Variable Function
24(sizeQueryTemp): 13(ptr) Variable Function
29(NumberOfLevelsU): 13(ptr) Variable Function
33(vsout): 32(ptr) Variable Function
18: 15 Load 17(g_tTex1df4)
20: 19(int) ImageQuerySize 18
Store 14(sizeQueryTemp) 20
22: 12(int) Load 14(sizeQueryTemp)
Store 21(WidthU) 22
24: 15 Load 17(g_tTex1df4)
26: 19(int) ImageQuerySizeLod 24 25
Store 23(sizeQueryTemp) 26
27: 12(int) Load 23(sizeQueryTemp)
Store 21(WidthU) 27
29: 15 Load 17(g_tTex1df4)
30: 19(int) ImageQueryLevels 29
Store 28(NumberOfLevelsU) 30
37: 36(ptr) AccessChain 32(vsout) 33
21: 12(int) ImageQuerySizeLod 18 20
Store 14(sizeQueryTemp) 21
23: 12(int) Load 14(sizeQueryTemp)
Store 22(WidthU) 23
25: 15 Load 17(g_tTex1df4)
27: 12(int) ImageQuerySizeLod 25 26
Store 24(sizeQueryTemp) 27
28: 12(int) Load 24(sizeQueryTemp)
Store 22(WidthU) 28
30: 15 Load 17(g_tTex1df4)
31: 12(int) ImageQueryLevels 30
Store 29(NumberOfLevelsU) 31
37: 36(ptr) AccessChain 33(vsout) 20
Store 37 35
38:8(VS_OUTPUT) Load 32(vsout)
38:8(VS_OUTPUT) Load 33(vsout)
ReturnValue 38
FunctionEnd

View File

@@ -725,7 +725,7 @@ gl_FragCoord origin is upper left
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 218 222
EntryPoint Fragment 4 "main" 216 220
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "PS_OUTPUT"
@@ -734,8 +734,8 @@ gl_FragCoord origin is upper left
Name 10 "@main("
Name 14 "sizeQueryTemp"
Name 17 "g_tTex1df4"
Name 21 "WidthU"
Name 23 "sizeQueryTemp"
Name 20 "WidthU"
Name 22 "sizeQueryTemp"
Name 26 "g_tTex1di4"
Name 30 "sizeQueryTemp"
Name 33 "g_tTex1du4"
@@ -747,36 +747,36 @@ gl_FragCoord origin is upper left
Name 54 "g_tBuffU"
Name 60 "sizeQueryTemp"
Name 63 "g_tTex1df4a"
Name 70 "ElementsU"
Name 74 "sizeQueryTemp"
Name 77 "g_tTex1di4a"
Name 84 "sizeQueryTemp"
Name 87 "g_tTex1du4a"
Name 94 "sizeQueryTemp"
Name 97 "g_tTex2df4"
Name 102 "HeightU"
Name 105 "sizeQueryTemp"
Name 108 "g_tTex2di4"
Name 115 "sizeQueryTemp"
Name 118 "g_tTex2du4"
Name 127 "sizeQueryTemp"
Name 130 "g_tTex2df4a"
Name 141 "sizeQueryTemp"
Name 144 "g_tTex2di4a"
Name 153 "sizeQueryTemp"
Name 156 "g_tTex2du4a"
Name 165 "sizeQueryTemp"
Name 168 "g_tTex3df4"
Name 175 "DepthU"
Name 178 "sizeQueryTemp"
Name 181 "g_tTex3di4"
Name 190 "sizeQueryTemp"
Name 193 "g_tTex3du4"
Name 203 "psout"
Name 215 "flattenTemp"
Name 218 "Color"
Name 222 "Depth"
Name 227 "g_sSamp"
Name 69 "ElementsU"
Name 73 "sizeQueryTemp"
Name 76 "g_tTex1di4a"
Name 83 "sizeQueryTemp"
Name 86 "g_tTex1du4a"
Name 93 "sizeQueryTemp"
Name 96 "g_tTex2df4"
Name 101 "HeightU"
Name 104 "sizeQueryTemp"
Name 107 "g_tTex2di4"
Name 114 "sizeQueryTemp"
Name 117 "g_tTex2du4"
Name 126 "sizeQueryTemp"
Name 129 "g_tTex2df4a"
Name 139 "sizeQueryTemp"
Name 142 "g_tTex2di4a"
Name 151 "sizeQueryTemp"
Name 154 "g_tTex2du4a"
Name 163 "sizeQueryTemp"
Name 166 "g_tTex3df4"
Name 173 "DepthU"
Name 176 "sizeQueryTemp"
Name 179 "g_tTex3di4"
Name 188 "sizeQueryTemp"
Name 191 "g_tTex3du4"
Name 201 "psout"
Name 213 "flattenTemp"
Name 216 "Color"
Name 220 "Depth"
Name 225 "g_sSamp"
Name 229 "$Global"
MemberName 229($Global) 0 "c1"
MemberName 229($Global) 1 "c2"
@@ -795,21 +795,21 @@ gl_FragCoord origin is upper left
Decorate 47(g_tBuffI) DescriptorSet 0
Decorate 54(g_tBuffU) DescriptorSet 0
Decorate 63(g_tTex1df4a) DescriptorSet 0
Decorate 77(g_tTex1di4a) DescriptorSet 0
Decorate 87(g_tTex1du4a) DescriptorSet 0
Decorate 97(g_tTex2df4) DescriptorSet 0
Decorate 108(g_tTex2di4) DescriptorSet 0
Decorate 118(g_tTex2du4) DescriptorSet 0
Decorate 130(g_tTex2df4a) DescriptorSet 0
Decorate 144(g_tTex2di4a) DescriptorSet 0
Decorate 156(g_tTex2du4a) DescriptorSet 0
Decorate 168(g_tTex3df4) DescriptorSet 0
Decorate 181(g_tTex3di4) DescriptorSet 0
Decorate 193(g_tTex3du4) DescriptorSet 0
Decorate 218(Color) Location 0
Decorate 222(Depth) BuiltIn FragDepth
Decorate 227(g_sSamp) DescriptorSet 0
Decorate 227(g_sSamp) Binding 0
Decorate 76(g_tTex1di4a) DescriptorSet 0
Decorate 86(g_tTex1du4a) DescriptorSet 0
Decorate 96(g_tTex2df4) DescriptorSet 0
Decorate 107(g_tTex2di4) DescriptorSet 0
Decorate 117(g_tTex2du4) DescriptorSet 0
Decorate 129(g_tTex2df4a) DescriptorSet 0
Decorate 142(g_tTex2di4a) DescriptorSet 0
Decorate 154(g_tTex2du4a) DescriptorSet 0
Decorate 166(g_tTex3df4) DescriptorSet 0
Decorate 179(g_tTex3di4) DescriptorSet 0
Decorate 191(g_tTex3du4) DescriptorSet 0
Decorate 216(Color) Location 0
Decorate 220(Depth) BuiltIn FragDepth
Decorate 225(g_sSamp) DescriptorSet 0
Decorate 225(g_sSamp) Binding 0
MemberDecorate 229($Global) 0 Offset 0
MemberDecorate 229($Global) 1 Offset 8
MemberDecorate 229($Global) 2 Offset 16
@@ -831,8 +831,8 @@ gl_FragCoord origin is upper left
15: TypeImage 6(float) 1D nonsampled format:Rgba32f
16: TypePointer UniformConstant 15
17(g_tTex1df4): 16(ptr) Variable UniformConstant
19: TypeInt 32 1
24: TypeImage 19(int) 1D nonsampled format:Rgba32i
23: TypeInt 32 1
24: TypeImage 23(int) 1D nonsampled format:Rgba32i
25: TypePointer UniformConstant 24
26(g_tTex1di4): 25(ptr) Variable UniformConstant
31: TypeImage 12(int) 1D nonsampled format:Rgba32ui
@@ -841,7 +841,7 @@ gl_FragCoord origin is upper left
38: TypeImage 6(float) Buffer nonsampled format:Rgba32f
39: TypePointer UniformConstant 38
40(g_tBuffF): 39(ptr) Variable UniformConstant
45: TypeImage 19(int) Buffer nonsampled format:Rgba32i
45: TypeImage 23(int) Buffer nonsampled format:Rgba32i
46: TypePointer UniformConstant 45
47(g_tBuffI): 46(ptr) Variable UniformConstant
52: TypeImage 12(int) Buffer nonsampled format:Rgba32ui
@@ -852,262 +852,262 @@ gl_FragCoord origin is upper left
61: TypeImage 6(float) 1D array nonsampled format:Rgba32f
62: TypePointer UniformConstant 61
63(g_tTex1df4a): 62(ptr) Variable UniformConstant
65: TypeVector 19(int) 2
67: 12(int) Constant 0
71: 12(int) Constant 1
75: TypeImage 19(int) 1D array nonsampled format:Rgba32i
76: TypePointer UniformConstant 75
77(g_tTex1di4a): 76(ptr) Variable UniformConstant
85: TypeImage 12(int) 1D array nonsampled format:Rgba32ui
86: TypePointer UniformConstant 85
87(g_tTex1du4a): 86(ptr) Variable UniformConstant
95: TypeImage 6(float) 2D nonsampled format:Rgba32f
96: TypePointer UniformConstant 95
97(g_tTex2df4): 96(ptr) Variable UniformConstant
106: TypeImage 19(int) 2D nonsampled format:Rgba32i
107: TypePointer UniformConstant 106
108(g_tTex2di4): 107(ptr) Variable UniformConstant
116: TypeImage 12(int) 2D nonsampled format:Rgba32ui
117: TypePointer UniformConstant 116
118(g_tTex2du4): 117(ptr) Variable UniformConstant
125: TypeVector 12(int) 3
126: TypePointer Function 125(ivec3)
128: TypeImage 6(float) 2D array nonsampled format:Rgba32f
129: TypePointer UniformConstant 128
130(g_tTex2df4a): 129(ptr) Variable UniformConstant
132: TypeVector 19(int) 3
138: 12(int) Constant 2
142: TypeImage 19(int) 2D array nonsampled format:Rgba32i
143: TypePointer UniformConstant 142
144(g_tTex2di4a): 143(ptr) Variable UniformConstant
154: TypeImage 12(int) 2D array nonsampled format:Rgba32ui
155: TypePointer UniformConstant 154
156(g_tTex2du4a): 155(ptr) Variable UniformConstant
166: TypeImage 6(float) 3D nonsampled format:Rgba32f
167: TypePointer UniformConstant 166
168(g_tTex3df4): 167(ptr) Variable UniformConstant
179: TypeImage 19(int) 3D nonsampled format:Rgba32i
180: TypePointer UniformConstant 179
181(g_tTex3di4): 180(ptr) Variable UniformConstant
191: TypeImage 12(int) 3D nonsampled format:Rgba32ui
192: TypePointer UniformConstant 191
193(g_tTex3du4): 192(ptr) Variable UniformConstant
202: TypePointer Function 8(PS_OUTPUT)
204: 19(int) Constant 0
205: 6(float) Constant 1065353216
206: 7(fvec4) ConstantComposite 205 205 205 205
207: TypePointer Function 7(fvec4)
209: 19(int) Constant 1
210: TypePointer Function 6(float)
217: TypePointer Output 7(fvec4)
218(Color): 217(ptr) Variable Output
221: TypePointer Output 6(float)
222(Depth): 221(ptr) Variable Output
225: TypeSampler
226: TypePointer UniformConstant 225
227(g_sSamp): 226(ptr) Variable UniformConstant
228: TypeVector 19(int) 4
229($Global): TypeStruct 19(int) 65(ivec2) 132(ivec3) 228(ivec4) 19(int) 65(ivec2) 132(ivec3) 228(ivec4)
66: 12(int) Constant 0
70: 12(int) Constant 1
74: TypeImage 23(int) 1D array nonsampled format:Rgba32i
75: TypePointer UniformConstant 74
76(g_tTex1di4a): 75(ptr) Variable UniformConstant
84: TypeImage 12(int) 1D array nonsampled format:Rgba32ui
85: TypePointer UniformConstant 84
86(g_tTex1du4a): 85(ptr) Variable UniformConstant
94: TypeImage 6(float) 2D nonsampled format:Rgba32f
95: TypePointer UniformConstant 94
96(g_tTex2df4): 95(ptr) Variable UniformConstant
105: TypeImage 23(int) 2D nonsampled format:Rgba32i
106: TypePointer UniformConstant 105
107(g_tTex2di4): 106(ptr) Variable UniformConstant
115: TypeImage 12(int) 2D nonsampled format:Rgba32ui
116: TypePointer UniformConstant 115
117(g_tTex2du4): 116(ptr) Variable UniformConstant
124: TypeVector 12(int) 3
125: TypePointer Function 124(ivec3)
127: TypeImage 6(float) 2D array nonsampled format:Rgba32f
128: TypePointer UniformConstant 127
129(g_tTex2df4a): 128(ptr) Variable UniformConstant
136: 12(int) Constant 2
140: TypeImage 23(int) 2D array nonsampled format:Rgba32i
141: TypePointer UniformConstant 140
142(g_tTex2di4a): 141(ptr) Variable UniformConstant
152: TypeImage 12(int) 2D array nonsampled format:Rgba32ui
153: TypePointer UniformConstant 152
154(g_tTex2du4a): 153(ptr) Variable UniformConstant
164: TypeImage 6(float) 3D nonsampled format:Rgba32f
165: TypePointer UniformConstant 164
166(g_tTex3df4): 165(ptr) Variable UniformConstant
177: TypeImage 23(int) 3D nonsampled format:Rgba32i
178: TypePointer UniformConstant 177
179(g_tTex3di4): 178(ptr) Variable UniformConstant
189: TypeImage 12(int) 3D nonsampled format:Rgba32ui
190: TypePointer UniformConstant 189
191(g_tTex3du4): 190(ptr) Variable UniformConstant
200: TypePointer Function 8(PS_OUTPUT)
202: 23(int) Constant 0
203: 6(float) Constant 1065353216
204: 7(fvec4) ConstantComposite 203 203 203 203
205: TypePointer Function 7(fvec4)
207: 23(int) Constant 1
208: TypePointer Function 6(float)
215: TypePointer Output 7(fvec4)
216(Color): 215(ptr) Variable Output
219: TypePointer Output 6(float)
220(Depth): 219(ptr) Variable Output
223: TypeSampler
224: TypePointer UniformConstant 223
225(g_sSamp): 224(ptr) Variable UniformConstant
226: TypeVector 23(int) 2
227: TypeVector 23(int) 3
228: TypeVector 23(int) 4
229($Global): TypeStruct 23(int) 226(ivec2) 227(ivec3) 228(ivec4) 23(int) 226(ivec2) 227(ivec3) 228(ivec4)
230: TypePointer Uniform 229($Global)
231: 230(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
215(flattenTemp): 202(ptr) Variable Function
216:8(PS_OUTPUT) FunctionCall 10(@main()
Store 215(flattenTemp) 216
219: 207(ptr) AccessChain 215(flattenTemp) 204
220: 7(fvec4) Load 219
Store 218(Color) 220
223: 210(ptr) AccessChain 215(flattenTemp) 209
224: 6(float) Load 223
Store 222(Depth) 224
213(flattenTemp): 200(ptr) Variable Function
214:8(PS_OUTPUT) FunctionCall 10(@main()
Store 213(flattenTemp) 214
217: 205(ptr) AccessChain 213(flattenTemp) 202
218: 7(fvec4) Load 217
Store 216(Color) 218
221: 208(ptr) AccessChain 213(flattenTemp) 207
222: 6(float) Load 221
Store 220(Depth) 222
Return
FunctionEnd
10(@main():8(PS_OUTPUT) Function None 9
11: Label
14(sizeQueryTemp): 13(ptr) Variable Function
21(WidthU): 13(ptr) Variable Function
23(sizeQueryTemp): 13(ptr) Variable Function
20(WidthU): 13(ptr) Variable Function
22(sizeQueryTemp): 13(ptr) Variable Function
30(sizeQueryTemp): 13(ptr) Variable Function
37(sizeQueryTemp): 13(ptr) Variable Function
44(sizeQueryTemp): 13(ptr) Variable Function
51(sizeQueryTemp): 13(ptr) Variable Function
60(sizeQueryTemp): 59(ptr) Variable Function
70(ElementsU): 13(ptr) Variable Function
74(sizeQueryTemp): 59(ptr) Variable Function
84(sizeQueryTemp): 59(ptr) Variable Function
94(sizeQueryTemp): 59(ptr) Variable Function
102(HeightU): 13(ptr) Variable Function
105(sizeQueryTemp): 59(ptr) Variable Function
115(sizeQueryTemp): 59(ptr) Variable Function
127(sizeQueryTemp): 126(ptr) Variable Function
141(sizeQueryTemp): 126(ptr) Variable Function
153(sizeQueryTemp): 126(ptr) Variable Function
165(sizeQueryTemp): 126(ptr) Variable Function
175(DepthU): 13(ptr) Variable Function
178(sizeQueryTemp): 126(ptr) Variable Function
190(sizeQueryTemp): 126(ptr) Variable Function
203(psout): 202(ptr) Variable Function
69(ElementsU): 13(ptr) Variable Function
73(sizeQueryTemp): 59(ptr) Variable Function
83(sizeQueryTemp): 59(ptr) Variable Function
93(sizeQueryTemp): 59(ptr) Variable Function
101(HeightU): 13(ptr) Variable Function
104(sizeQueryTemp): 59(ptr) Variable Function
114(sizeQueryTemp): 59(ptr) Variable Function
126(sizeQueryTemp): 125(ptr) Variable Function
139(sizeQueryTemp): 125(ptr) Variable Function
151(sizeQueryTemp): 125(ptr) Variable Function
163(sizeQueryTemp): 125(ptr) Variable Function
173(DepthU): 13(ptr) Variable Function
176(sizeQueryTemp): 125(ptr) Variable Function
188(sizeQueryTemp): 125(ptr) Variable Function
201(psout): 200(ptr) Variable Function
18: 15 Load 17(g_tTex1df4)
20: 19(int) ImageQuerySize 18
Store 14(sizeQueryTemp) 20
22: 12(int) Load 14(sizeQueryTemp)
Store 21(WidthU) 22
19: 12(int) ImageQuerySize 18
Store 14(sizeQueryTemp) 19
21: 12(int) Load 14(sizeQueryTemp)
Store 20(WidthU) 21
27: 24 Load 26(g_tTex1di4)
28: 19(int) ImageQuerySize 27
Store 23(sizeQueryTemp) 28
29: 12(int) Load 23(sizeQueryTemp)
Store 21(WidthU) 29
28: 12(int) ImageQuerySize 27
Store 22(sizeQueryTemp) 28
29: 12(int) Load 22(sizeQueryTemp)
Store 20(WidthU) 29
34: 31 Load 33(g_tTex1du4)
35: 19(int) ImageQuerySize 34
35: 12(int) ImageQuerySize 34
Store 30(sizeQueryTemp) 35
36: 12(int) Load 30(sizeQueryTemp)
Store 21(WidthU) 36
Store 20(WidthU) 36
41: 38 Load 40(g_tBuffF)
42: 19(int) ImageQuerySize 41
42: 12(int) ImageQuerySize 41
Store 37(sizeQueryTemp) 42
43: 12(int) Load 37(sizeQueryTemp)
Store 21(WidthU) 43
Store 20(WidthU) 43
48: 45 Load 47(g_tBuffI)
49: 19(int) ImageQuerySize 48
49: 12(int) ImageQuerySize 48
Store 44(sizeQueryTemp) 49
50: 12(int) Load 44(sizeQueryTemp)
Store 21(WidthU) 50
Store 20(WidthU) 50
55: 52 Load 54(g_tBuffU)
56: 19(int) ImageQuerySize 55
56: 12(int) ImageQuerySize 55
Store 51(sizeQueryTemp) 56
57: 12(int) Load 51(sizeQueryTemp)
Store 21(WidthU) 57
Store 20(WidthU) 57
64: 61 Load 63(g_tTex1df4a)
66: 65(ivec2) ImageQuerySize 64
Store 60(sizeQueryTemp) 66
68: 13(ptr) AccessChain 60(sizeQueryTemp) 67
69: 12(int) Load 68
Store 21(WidthU) 69
72: 13(ptr) AccessChain 60(sizeQueryTemp) 71
73: 12(int) Load 72
Store 70(ElementsU) 73
78: 75 Load 77(g_tTex1di4a)
79: 65(ivec2) ImageQuerySize 78
Store 74(sizeQueryTemp) 79
80: 13(ptr) AccessChain 74(sizeQueryTemp) 67
81: 12(int) Load 80
Store 21(WidthU) 81
82: 13(ptr) AccessChain 74(sizeQueryTemp) 71
83: 12(int) Load 82
Store 70(ElementsU) 83
88: 85 Load 87(g_tTex1du4a)
89: 65(ivec2) ImageQuerySize 88
Store 84(sizeQueryTemp) 89
90: 13(ptr) AccessChain 84(sizeQueryTemp) 67
91: 12(int) Load 90
Store 21(WidthU) 91
92: 13(ptr) AccessChain 84(sizeQueryTemp) 71
93: 12(int) Load 92
Store 70(ElementsU) 93
98: 95 Load 97(g_tTex2df4)
99: 65(ivec2) ImageQuerySize 98
Store 94(sizeQueryTemp) 99
100: 13(ptr) AccessChain 94(sizeQueryTemp) 67
101: 12(int) Load 100
Store 21(WidthU) 101
103: 13(ptr) AccessChain 94(sizeQueryTemp) 71
104: 12(int) Load 103
Store 102(HeightU) 104
109: 106 Load 108(g_tTex2di4)
110: 65(ivec2) ImageQuerySize 109
Store 105(sizeQueryTemp) 110
111: 13(ptr) AccessChain 105(sizeQueryTemp) 67
112: 12(int) Load 111
Store 21(WidthU) 112
113: 13(ptr) AccessChain 105(sizeQueryTemp) 71
114: 12(int) Load 113
Store 102(HeightU) 114
119: 116 Load 118(g_tTex2du4)
120: 65(ivec2) ImageQuerySize 119
Store 115(sizeQueryTemp) 120
121: 13(ptr) AccessChain 115(sizeQueryTemp) 67
122: 12(int) Load 121
Store 21(WidthU) 122
123: 13(ptr) AccessChain 115(sizeQueryTemp) 71
124: 12(int) Load 123
Store 102(HeightU) 124
131: 128 Load 130(g_tTex2df4a)
133: 132(ivec3) ImageQuerySize 131
Store 127(sizeQueryTemp) 133
134: 13(ptr) AccessChain 127(sizeQueryTemp) 67
65: 58(ivec2) ImageQuerySize 64
Store 60(sizeQueryTemp) 65
67: 13(ptr) AccessChain 60(sizeQueryTemp) 66
68: 12(int) Load 67
Store 20(WidthU) 68
71: 13(ptr) AccessChain 60(sizeQueryTemp) 70
72: 12(int) Load 71
Store 69(ElementsU) 72
77: 74 Load 76(g_tTex1di4a)
78: 58(ivec2) ImageQuerySize 77
Store 73(sizeQueryTemp) 78
79: 13(ptr) AccessChain 73(sizeQueryTemp) 66
80: 12(int) Load 79
Store 20(WidthU) 80
81: 13(ptr) AccessChain 73(sizeQueryTemp) 70
82: 12(int) Load 81
Store 69(ElementsU) 82
87: 84 Load 86(g_tTex1du4a)
88: 58(ivec2) ImageQuerySize 87
Store 83(sizeQueryTemp) 88
89: 13(ptr) AccessChain 83(sizeQueryTemp) 66
90: 12(int) Load 89
Store 20(WidthU) 90
91: 13(ptr) AccessChain 83(sizeQueryTemp) 70
92: 12(int) Load 91
Store 69(ElementsU) 92
97: 94 Load 96(g_tTex2df4)
98: 58(ivec2) ImageQuerySize 97
Store 93(sizeQueryTemp) 98
99: 13(ptr) AccessChain 93(sizeQueryTemp) 66
100: 12(int) Load 99
Store 20(WidthU) 100
102: 13(ptr) AccessChain 93(sizeQueryTemp) 70
103: 12(int) Load 102
Store 101(HeightU) 103
108: 105 Load 107(g_tTex2di4)
109: 58(ivec2) ImageQuerySize 108
Store 104(sizeQueryTemp) 109
110: 13(ptr) AccessChain 104(sizeQueryTemp) 66
111: 12(int) Load 110
Store 20(WidthU) 111
112: 13(ptr) AccessChain 104(sizeQueryTemp) 70
113: 12(int) Load 112
Store 101(HeightU) 113
118: 115 Load 117(g_tTex2du4)
119: 58(ivec2) ImageQuerySize 118
Store 114(sizeQueryTemp) 119
120: 13(ptr) AccessChain 114(sizeQueryTemp) 66
121: 12(int) Load 120
Store 20(WidthU) 121
122: 13(ptr) AccessChain 114(sizeQueryTemp) 70
123: 12(int) Load 122
Store 101(HeightU) 123
130: 127 Load 129(g_tTex2df4a)
131: 124(ivec3) ImageQuerySize 130
Store 126(sizeQueryTemp) 131
132: 13(ptr) AccessChain 126(sizeQueryTemp) 66
133: 12(int) Load 132
Store 20(WidthU) 133
134: 13(ptr) AccessChain 126(sizeQueryTemp) 70
135: 12(int) Load 134
Store 21(WidthU) 135
136: 13(ptr) AccessChain 127(sizeQueryTemp) 71
137: 12(int) Load 136
Store 102(HeightU) 137
139: 13(ptr) AccessChain 127(sizeQueryTemp) 138
140: 12(int) Load 139
Store 70(ElementsU) 140
145: 142 Load 144(g_tTex2di4a)
146: 132(ivec3) ImageQuerySize 145
Store 141(sizeQueryTemp) 146
147: 13(ptr) AccessChain 141(sizeQueryTemp) 67
Store 101(HeightU) 135
137: 13(ptr) AccessChain 126(sizeQueryTemp) 136
138: 12(int) Load 137
Store 69(ElementsU) 138
143: 140 Load 142(g_tTex2di4a)
144: 124(ivec3) ImageQuerySize 143
Store 139(sizeQueryTemp) 144
145: 13(ptr) AccessChain 139(sizeQueryTemp) 66
146: 12(int) Load 145
Store 20(WidthU) 146
147: 13(ptr) AccessChain 139(sizeQueryTemp) 70
148: 12(int) Load 147
Store 21(WidthU) 148
149: 13(ptr) AccessChain 141(sizeQueryTemp) 71
Store 101(HeightU) 148
149: 13(ptr) AccessChain 139(sizeQueryTemp) 136
150: 12(int) Load 149
Store 102(HeightU) 150
151: 13(ptr) AccessChain 141(sizeQueryTemp) 138
152: 12(int) Load 151
Store 70(ElementsU) 152
157: 154 Load 156(g_tTex2du4a)
158: 132(ivec3) ImageQuerySize 157
Store 153(sizeQueryTemp) 158
159: 13(ptr) AccessChain 153(sizeQueryTemp) 67
Store 69(ElementsU) 150
155: 152 Load 154(g_tTex2du4a)
156: 124(ivec3) ImageQuerySize 155
Store 151(sizeQueryTemp) 156
157: 13(ptr) AccessChain 151(sizeQueryTemp) 66
158: 12(int) Load 157
Store 20(WidthU) 158
159: 13(ptr) AccessChain 151(sizeQueryTemp) 70
160: 12(int) Load 159
Store 21(WidthU) 160
161: 13(ptr) AccessChain 153(sizeQueryTemp) 71
Store 101(HeightU) 160
161: 13(ptr) AccessChain 151(sizeQueryTemp) 136
162: 12(int) Load 161
Store 102(HeightU) 162
163: 13(ptr) AccessChain 153(sizeQueryTemp) 138
164: 12(int) Load 163
Store 70(ElementsU) 164
169: 166 Load 168(g_tTex3df4)
170: 132(ivec3) ImageQuerySize 169
Store 165(sizeQueryTemp) 170
171: 13(ptr) AccessChain 165(sizeQueryTemp) 67
Store 69(ElementsU) 162
167: 164 Load 166(g_tTex3df4)
168: 124(ivec3) ImageQuerySize 167
Store 163(sizeQueryTemp) 168
169: 13(ptr) AccessChain 163(sizeQueryTemp) 66
170: 12(int) Load 169
Store 20(WidthU) 170
171: 13(ptr) AccessChain 163(sizeQueryTemp) 70
172: 12(int) Load 171
Store 21(WidthU) 172
173: 13(ptr) AccessChain 165(sizeQueryTemp) 71
174: 12(int) Load 173
Store 102(HeightU) 174
176: 13(ptr) AccessChain 165(sizeQueryTemp) 138
177: 12(int) Load 176
Store 175(DepthU) 177
182: 179 Load 181(g_tTex3di4)
183: 132(ivec3) ImageQuerySize 182
Store 178(sizeQueryTemp) 183
184: 13(ptr) AccessChain 178(sizeQueryTemp) 67
Store 101(HeightU) 172
174: 13(ptr) AccessChain 163(sizeQueryTemp) 136
175: 12(int) Load 174
Store 173(DepthU) 175
180: 177 Load 179(g_tTex3di4)
181: 124(ivec3) ImageQuerySize 180
Store 176(sizeQueryTemp) 181
182: 13(ptr) AccessChain 176(sizeQueryTemp) 66
183: 12(int) Load 182
Store 20(WidthU) 183
184: 13(ptr) AccessChain 176(sizeQueryTemp) 70
185: 12(int) Load 184
Store 21(WidthU) 185
186: 13(ptr) AccessChain 178(sizeQueryTemp) 71
Store 101(HeightU) 185
186: 13(ptr) AccessChain 176(sizeQueryTemp) 136
187: 12(int) Load 186
Store 102(HeightU) 187
188: 13(ptr) AccessChain 178(sizeQueryTemp) 138
189: 12(int) Load 188
Store 175(DepthU) 189
194: 191 Load 193(g_tTex3du4)
195: 132(ivec3) ImageQuerySize 194
Store 190(sizeQueryTemp) 195
196: 13(ptr) AccessChain 190(sizeQueryTemp) 67
Store 173(DepthU) 187
192: 189 Load 191(g_tTex3du4)
193: 124(ivec3) ImageQuerySize 192
Store 188(sizeQueryTemp) 193
194: 13(ptr) AccessChain 188(sizeQueryTemp) 66
195: 12(int) Load 194
Store 20(WidthU) 195
196: 13(ptr) AccessChain 188(sizeQueryTemp) 70
197: 12(int) Load 196
Store 21(WidthU) 197
198: 13(ptr) AccessChain 190(sizeQueryTemp) 71
Store 101(HeightU) 197
198: 13(ptr) AccessChain 188(sizeQueryTemp) 136
199: 12(int) Load 198
Store 102(HeightU) 199
200: 13(ptr) AccessChain 190(sizeQueryTemp) 138
201: 12(int) Load 200
Store 175(DepthU) 201
208: 207(ptr) AccessChain 203(psout) 204
Store 208 206
211: 210(ptr) AccessChain 203(psout) 209
Store 211 205
212:8(PS_OUTPUT) Load 203(psout)
ReturnValue 212
Store 173(DepthU) 199
206: 205(ptr) AccessChain 201(psout) 202
Store 206 204
209: 208(ptr) AccessChain 201(psout) 207
Store 209 203
210:8(PS_OUTPUT) Load 201(psout)
ReturnValue 210
FunctionEnd

View File

@@ -80,6 +80,16 @@ gl_FragCoord origin is upper left
0:31 'ii' (temp float)
0:32 Pre-Increment (temp int)
0:32 'ii' (temp int)
0:33 Test condition and select (temp void)
0:33 Condition
0:33 Compare Equal (temp bool)
0:33 Convert int to float (temp float)
0:33 'ii' (temp int)
0:33 Constant:
0:33 1.000000
0:33 true case
0:34 Pre-Increment (temp int)
0:34 'ii' (temp int)
0:2 Function Definition: PixelShaderFunction( (temp void)
0:2 Function Parameters:
0:? Sequence
@@ -179,6 +189,16 @@ gl_FragCoord origin is upper left
0:31 'ii' (temp float)
0:32 Pre-Increment (temp int)
0:32 'ii' (temp int)
0:33 Test condition and select (temp void)
0:33 Condition
0:33 Compare Equal (temp bool)
0:33 Convert int to float (temp float)
0:33 'ii' (temp int)
0:33 Constant:
0:33 1.000000
0:33 true case
0:34 Pre-Increment (temp int)
0:34 'ii' (temp int)
0:2 Function Definition: PixelShaderFunction( (temp void)
0:2 Function Parameters:
0:? Sequence
@@ -195,24 +215,24 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 94
// Id's are bound by 101
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 87 90
EntryPoint Fragment 4 "PixelShaderFunction" 94 97
ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction"
Name 11 "@PixelShaderFunction(vf4;"
Name 10 "input"
Name 68 "ii"
Name 80 "ii"
Name 85 "input"
Name 87 "input"
Name 90 "@entryPointOutput"
Name 91 "param"
Decorate 87(input) Location 0
Decorate 90(@entryPointOutput) Location 0
Name 92 "input"
Name 94 "input"
Name 97 "@entryPointOutput"
Name 98 "param"
Decorate 94(input) Location 0
Decorate 97(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -228,20 +248,20 @@ gl_FragCoord origin is upper left
78: TypeInt 32 1
79: TypePointer Function 78(int)
82: 78(int) Constant 1
86: TypePointer Input 7(fvec4)
87(input): 86(ptr) Variable Input
89: TypePointer Output 7(fvec4)
90(@entryPointOutput): 89(ptr) Variable Output
93: TypePointer Input 7(fvec4)
94(input): 93(ptr) Variable Input
96: TypePointer Output 7(fvec4)
97(@entryPointOutput): 96(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
5: Label
85(input): 8(ptr) Variable Function
91(param): 8(ptr) Variable Function
88: 7(fvec4) Load 87(input)
Store 85(input) 88
92: 7(fvec4) Load 85(input)
Store 91(param) 92
93: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 91(param)
Store 90(@entryPointOutput) 93
92(input): 8(ptr) Variable Function
98(param): 8(ptr) Variable Function
95: 7(fvec4) Load 94(input)
Store 92(input) 95
99: 7(fvec4) Load 92(input)
Store 98(param) 99
100: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 98(param)
Store 97(@entryPointOutput) 100
Return
FunctionEnd
11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9
@@ -329,6 +349,17 @@ gl_FragCoord origin is upper left
81: 78(int) Load 80(ii)
83: 78(int) IAdd 81 82
Store 80(ii) 83
84: 7(fvec4) Undef
ReturnValue 84
84: 78(int) Load 80(ii)
85: 6(float) ConvertSToF 84
86: 15(bool) FOrdEqual 85 76
SelectionMerge 88 None
BranchConditional 86 87 88
87: Label
89: 78(int) Load 80(ii)
90: 78(int) IAdd 89 82
Store 80(ii) 90
Branch 88
88: Label
91: 7(fvec4) Undef
ReturnValue 91
FunctionEnd

View File

@@ -364,6 +364,8 @@ gl_FragCoord origin is upper left
0:70 'sizeQueryTemp' (temp uint)
0:70 textureSize (temp uint)
0:70 'g_tTex1df4' (uniform texture1D)
0:70 Constant:
0:70 0 (const int)
0:70 move second child to first child (temp int)
0:70 'WidthI' (temp int)
0:70 Convert uint to int (temp int)
@@ -808,6 +810,8 @@ gl_FragCoord origin is upper left
0:70 'sizeQueryTemp' (temp uint)
0:70 textureSize (temp uint)
0:70 'g_tTex1df4' (uniform texture1D)
0:70 Constant:
0:70 0 (const int)
0:70 move second child to first child (temp int)
0:70 'WidthI' (temp int)
0:70 Convert uint to int (temp int)
@@ -1284,37 +1288,37 @@ gl_FragCoord origin is upper left
276: 6(float) CompositeExtract 275 0
Store 268(r51) 276
281: 278 Load 280(g_tTex1df4)
282: 14(int) ImageQuerySize 281
282: 15(int) ImageQuerySizeLod 281 53
Store 277(sizeQueryTemp) 282
284: 15(int) Load 277(sizeQueryTemp)
285: 14(int) Bitcast 284
Store 283(WidthI) 285
287: 278 Load 280(g_tTex1df4)
289: 14(int) ImageQuerySizeLod 287 288
289: 15(int) ImageQuerySizeLod 287 288
Store 286(sizeQueryTemp) 289
290: 15(int) Load 286(sizeQueryTemp)
291: 14(int) Bitcast 290
Store 283(WidthI) 291
293: 278 Load 280(g_tTex1df4)
294: 14(int) ImageQueryLevels 293
294: 15(int) ImageQueryLevels 293
Store 292(NumberOfLevelsU) 294
296: 278 Load 280(g_tTex1df4)
297: 14(int) ImageQuerySizeLod 296 288
297: 15(int) ImageQuerySizeLod 296 288
Store 295(sizeQueryTemp) 297
299: 15(int) Load 295(sizeQueryTemp)
Store 298(WidthU) 299
301: 278 Load 280(g_tTex1df4)
302: 14(int) ImageQueryLevels 301
302: 15(int) ImageQueryLevels 301
303: 14(int) Bitcast 302
Store 300(NumberOfLevelsI) 303
305: 278 Load 280(g_tTex1df4)
306: 14(int) ImageQuerySizeLod 305 288
306: 15(int) ImageQuerySizeLod 305 288
Store 304(sizeQueryTemp) 306
307: 15(int) Load 304(sizeQueryTemp)
308: 14(int) Bitcast 307
Store 283(WidthI) 308
309: 278 Load 280(g_tTex1df4)
310: 14(int) ImageQueryLevels 309
310: 15(int) ImageQueryLevels 309
311: 14(int) Bitcast 310
Store 300(NumberOfLevelsI) 311
314: 6(float) Load 13(r00)

View File

@@ -19,6 +19,8 @@ gl_FragCoord origin is upper left
0:40 'sizeQueryTemp' (temp uint)
0:40 textureSize (temp uint)
0:40 'g_tTex1df4' (uniform texture1D)
0:40 Constant:
0:40 0 (const int)
0:40 move second child to first child (temp int)
0:40 'WidthI' (temp int)
0:40 Convert uint to int (temp int)
@@ -121,6 +123,8 @@ gl_FragCoord origin is upper left
0:40 'sizeQueryTemp' (temp uint)
0:40 textureSize (temp uint)
0:40 'g_tTex1df4' (uniform texture1D)
0:40 Constant:
0:40 0 (const int)
0:40 move second child to first child (temp int)
0:40 'WidthI' (temp int)
0:40 Convert uint to int (temp int)
@@ -229,14 +233,14 @@ gl_FragCoord origin is upper left
Name 19 ""
Name 28 "sizeQueryTemp"
Name 31 "g_tTex1df4"
Name 35 "WidthI"
Name 38 "sizeQueryTemp"
Name 44 "NumberOfLevelsU"
Name 47 "sizeQueryTemp"
Name 50 "WidthU"
Name 52 "NumberOfLevelsI"
Name 56 "sizeQueryTemp"
Name 65 "ps_output"
Name 36 "WidthI"
Name 39 "sizeQueryTemp"
Name 45 "NumberOfLevelsU"
Name 48 "sizeQueryTemp"
Name 51 "WidthU"
Name 53 "NumberOfLevelsI"
Name 57 "sizeQueryTemp"
Name 66 "ps_output"
Name 74 "color"
Name 80 "g_tTexbfs"
MemberDecorate 17($Global) 0 Offset 0
@@ -276,10 +280,10 @@ gl_FragCoord origin is upper left
29: TypeImage 6(float) 1D sampled format:Unknown
30: TypePointer UniformConstant 29
31(g_tTex1df4): 30(ptr) Variable UniformConstant
34: TypePointer Function 12(int)
40: 13(int) Constant 6
64: TypePointer Function 8(PS_OUTPUT)
66: 12(int) Constant 0
33: 12(int) Constant 0
35: TypePointer Function 12(int)
41: 13(int) Constant 6
65: TypePointer Function 8(PS_OUTPUT)
67: 7(fvec4) ConstantComposite 24 24 24 24
68: TypePointer Function 7(fvec4)
73: TypePointer Output 7(fvec4)
@@ -298,53 +302,53 @@ gl_FragCoord origin is upper left
10(@main():8(PS_OUTPUT) Function None 9
11: Label
28(sizeQueryTemp): 27(ptr) Variable Function
35(WidthI): 34(ptr) Variable Function
38(sizeQueryTemp): 27(ptr) Variable Function
44(NumberOfLevelsU): 27(ptr) Variable Function
47(sizeQueryTemp): 27(ptr) Variable Function
50(WidthU): 27(ptr) Variable Function
52(NumberOfLevelsI): 34(ptr) Variable Function
56(sizeQueryTemp): 27(ptr) Variable Function
65(ps_output): 64(ptr) Variable Function
36(WidthI): 35(ptr) Variable Function
39(sizeQueryTemp): 27(ptr) Variable Function
45(NumberOfLevelsU): 27(ptr) Variable Function
48(sizeQueryTemp): 27(ptr) Variable Function
51(WidthU): 27(ptr) Variable Function
53(NumberOfLevelsI): 35(ptr) Variable Function
57(sizeQueryTemp): 27(ptr) Variable Function
66(ps_output): 65(ptr) Variable Function
22: 21(ptr) AccessChain 19 20
23: 6(float) Load 22
26: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 23 24 25
32: 29 Load 31(g_tTex1df4)
33: 12(int) ImageQuerySize 32
Store 28(sizeQueryTemp) 33
36: 13(int) Load 28(sizeQueryTemp)
37: 12(int) Bitcast 36
Store 35(WidthI) 37
39: 29 Load 31(g_tTex1df4)
41: 12(int) ImageQuerySizeLod 39 40
Store 38(sizeQueryTemp) 41
42: 13(int) Load 38(sizeQueryTemp)
43: 12(int) Bitcast 42
Store 35(WidthI) 43
45: 29 Load 31(g_tTex1df4)
46: 12(int) ImageQueryLevels 45
Store 44(NumberOfLevelsU) 46
48: 29 Load 31(g_tTex1df4)
49: 12(int) ImageQuerySizeLod 48 40
Store 47(sizeQueryTemp) 49
51: 13(int) Load 47(sizeQueryTemp)
Store 50(WidthU) 51
53: 29 Load 31(g_tTex1df4)
54: 12(int) ImageQueryLevels 53
55: 12(int) Bitcast 54
Store 52(NumberOfLevelsI) 55
57: 29 Load 31(g_tTex1df4)
58: 12(int) ImageQuerySizeLod 57 40
Store 56(sizeQueryTemp) 58
59: 13(int) Load 56(sizeQueryTemp)
60: 12(int) Bitcast 59
Store 35(WidthI) 60
61: 29 Load 31(g_tTex1df4)
62: 12(int) ImageQueryLevels 61
63: 12(int) Bitcast 62
Store 52(NumberOfLevelsI) 63
69: 68(ptr) AccessChain 65(ps_output) 66
34: 13(int) ImageQuerySizeLod 32 33
Store 28(sizeQueryTemp) 34
37: 13(int) Load 28(sizeQueryTemp)
38: 12(int) Bitcast 37
Store 36(WidthI) 38
40: 29 Load 31(g_tTex1df4)
42: 13(int) ImageQuerySizeLod 40 41
Store 39(sizeQueryTemp) 42
43: 13(int) Load 39(sizeQueryTemp)
44: 12(int) Bitcast 43
Store 36(WidthI) 44
46: 29 Load 31(g_tTex1df4)
47: 13(int) ImageQueryLevels 46
Store 45(NumberOfLevelsU) 47
49: 29 Load 31(g_tTex1df4)
50: 13(int) ImageQuerySizeLod 49 41
Store 48(sizeQueryTemp) 50
52: 13(int) Load 48(sizeQueryTemp)
Store 51(WidthU) 52
54: 29 Load 31(g_tTex1df4)
55: 13(int) ImageQueryLevels 54
56: 12(int) Bitcast 55
Store 53(NumberOfLevelsI) 56
58: 29 Load 31(g_tTex1df4)
59: 13(int) ImageQuerySizeLod 58 41
Store 57(sizeQueryTemp) 59
60: 13(int) Load 57(sizeQueryTemp)
61: 12(int) Bitcast 60
Store 36(WidthI) 61
62: 29 Load 31(g_tTex1df4)
63: 13(int) ImageQueryLevels 62
64: 12(int) Bitcast 63
Store 53(NumberOfLevelsI) 64
69: 68(ptr) AccessChain 66(ps_output) 33
Store 69 67
70:8(PS_OUTPUT) Load 65(ps_output)
70:8(PS_OUTPUT) Load 66(ps_output)
ReturnValue 70
FunctionEnd

View File

@@ -220,6 +220,7 @@ Shader version: 450
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
0:? '@entryPointOutput' (layout(location=0 ) out structure{})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
@@ -447,18 +448,19 @@ Shader version: 450
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
0:? '@entryPointOutput' (layout(location=0 ) out structure{})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 171
// Id's are bound by 174
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 129
EntryPoint Vertex 4 "main" 129 173
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
@@ -497,6 +499,8 @@ Shader version: 450
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
@@ -532,6 +536,7 @@ Shader version: 450
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
@@ -630,6 +635,9 @@ Shader version: 450
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,6 +242,7 @@ Shader version: 450
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:
@@ -490,16 +491,17 @@ Shader version: 450
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 166
// Id's are bound by 169
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 162
EntryPoint Vertex 4 "main" 162 168
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
@@ -532,6 +534,8 @@ Shader version: 450
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
@@ -550,6 +554,7 @@ Shader version: 450
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
@@ -643,6 +648,9 @@ Shader version: 450
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,6 +188,7 @@ Shader version: 450
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:
@@ -382,16 +383,17 @@ Shader version: 450
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 162
// Id's are bound by 165
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 158
EntryPoint Vertex 4 "main" 158 164
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
@@ -424,6 +426,8 @@ Shader version: 450
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
@@ -442,6 +446,7 @@ Shader version: 450
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
@@ -531,6 +536,9 @@ Shader version: 450
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

@@ -0,0 +1,246 @@
hlsl.semantic.geom
Shader version: 450
invocations = -1
max_vertices = 4
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:12 Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Parameters:
0:12 'VertexID' (in 3-element array of uint)
0:12 'OutputStream' (out structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? Sequence
0:14 Branch: Return with expression
0:14 's' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Definition: main( (temp void)
0:12 Function Parameters:
0:? Sequence
0:12 move second child to first child (temp 3-element array of uint)
0:? 'VertexID' (temp 3-element array of uint)
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:12 Sequence
0:12 move second child to first child (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? 'VertexID' (temp 3-element array of uint)
0:? 'OutputStream' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip0' (out float ClipDistance)
0:12 clip0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull0' (out float CullDistance)
0:12 cull0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child (temp uint)
0:? '@entryPointOutput_vpai' (out uint ViewportIndex)
0:12 vpai: direct index for structure (temp uint)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child (temp uint)
0:? '@entryPointOutput_rtai' (out uint Layer)
0:12 rtai: direct index for structure (temp uint)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:12 '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 ii: direct index for structure (temp int)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:? '@entryPointOutput_vpai' (out uint ViewportIndex)
Linked geometry stage:
Shader version: 450
invocations = 1
max_vertices = 4
input primitive = triangles
output primitive = line_strip
0:? Sequence
0:12 Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Parameters:
0:12 'VertexID' (in 3-element array of uint)
0:12 'OutputStream' (out structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? Sequence
0:14 Branch: Return with expression
0:14 's' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Definition: main( (temp void)
0:12 Function Parameters:
0:? Sequence
0:12 move second child to first child (temp 3-element array of uint)
0:? 'VertexID' (temp 3-element array of uint)
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:12 Sequence
0:12 move second child to first child (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:? 'VertexID' (temp 3-element array of uint)
0:? 'OutputStream' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip0' (out float ClipDistance)
0:12 clip0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull0' (out float CullDistance)
0:12 cull0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child (temp uint)
0:? '@entryPointOutput_vpai' (out uint ViewportIndex)
0:12 vpai: direct index for structure (temp uint)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child (temp uint)
0:? '@entryPointOutput_rtai' (out uint Layer)
0:12 rtai: direct index for structure (temp uint)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:12 '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 ii: direct index for structure (temp int)
0:12 'flattenTemp' (temp structure{temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:? '@entryPointOutput_vpai' (out uint ViewportIndex)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 62
Capability Geometry
Capability ClipDistance
Capability CullDistance
Capability MultiViewport
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 25 34 39 44 49 55
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip
ExecutionMode 4 OutputVertices 4
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "clip0"
MemberName 12(S) 1 "cull0"
MemberName 12(S) 2 "vpai"
MemberName 12(S) 3 "rtai"
MemberName 12(S) 4 "ii"
Name 17 "@main(u1[3];struct-S-f1-f1-u1-u1-i11;"
Name 15 "VertexID"
Name 16 "OutputStream"
Name 19 "s"
Name 23 "VertexID"
Name 25 "VertexID"
Name 27 "flattenTemp"
Name 28 "OutputStream"
Name 29 "param"
Name 31 "param"
Name 34 "@entryPointOutput_clip0"
Name 39 "@entryPointOutput_cull0"
Name 44 "@entryPointOutput_vpai"
Name 49 "@entryPointOutput_rtai"
Name 53 "S"
MemberName 53(S) 0 "ii"
Name 55 "@entryPointOutput"
Decorate 25(VertexID) Location 0
Decorate 34(@entryPointOutput_clip0) BuiltIn ClipDistance
Decorate 39(@entryPointOutput_cull0) BuiltIn CullDistance
Decorate 44(@entryPointOutput_vpai) BuiltIn ViewportIndex
Decorate 49(@entryPointOutput_rtai) BuiltIn Layer
Decorate 55(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: 6(int) Constant 3
8: TypeArray 6(int) 7
9: TypePointer Function 8
10: TypeFloat 32
11: TypeInt 32 1
12(S): TypeStruct 10(float) 10(float) 6(int) 6(int) 11(int)
13: TypePointer Function 12(S)
14: TypeFunction 12(S) 9(ptr) 13(ptr)
24: TypePointer Input 8
25(VertexID): 24(ptr) Variable Input
33: TypePointer Output 10(float)
34(@entryPointOutput_clip0): 33(ptr) Variable Output
35: 11(int) Constant 0
36: TypePointer Function 10(float)
39(@entryPointOutput_cull0): 33(ptr) Variable Output
40: 11(int) Constant 1
43: TypePointer Output 6(int)
44(@entryPointOutput_vpai): 43(ptr) Variable Output
45: 11(int) Constant 2
46: TypePointer Function 6(int)
49(@entryPointOutput_rtai): 43(ptr) Variable Output
50: 11(int) Constant 3
53(S): TypeStruct 11(int)
54: TypePointer Output 53(S)
55(@entryPointOutput): 54(ptr) Variable Output
56: 11(int) Constant 4
57: TypePointer Function 11(int)
60: TypePointer Output 11(int)
4(main): 2 Function None 3
5: Label
23(VertexID): 9(ptr) Variable Function
27(flattenTemp): 13(ptr) Variable Function
28(OutputStream): 13(ptr) Variable Function
29(param): 9(ptr) Variable Function
31(param): 13(ptr) Variable Function
26: 8 Load 25(VertexID)
Store 23(VertexID) 26
30: 8 Load 23(VertexID)
Store 29(param) 30
32: 12(S) FunctionCall 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;) 29(param) 31(param)
Store 27(flattenTemp) 32
37: 36(ptr) AccessChain 27(flattenTemp) 35
38: 10(float) Load 37
Store 34(@entryPointOutput_clip0) 38
41: 36(ptr) AccessChain 27(flattenTemp) 40
42: 10(float) Load 41
Store 39(@entryPointOutput_cull0) 42
47: 46(ptr) AccessChain 27(flattenTemp) 45
48: 6(int) Load 47
Store 44(@entryPointOutput_vpai) 48
51: 46(ptr) AccessChain 27(flattenTemp) 50
52: 6(int) Load 51
Store 49(@entryPointOutput_rtai) 52
58: 57(ptr) AccessChain 27(flattenTemp) 56
59: 11(int) Load 58
61: 60(ptr) AccessChain 55(@entryPointOutput) 35
Store 61 59
Return
FunctionEnd
17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;): 12(S) Function None 14
15(VertexID): 9(ptr) FunctionParameter
16(OutputStream): 13(ptr) FunctionParameter
18: Label
19(s): 13(ptr) Variable Function
20: 12(S) Load 19(s)
ReturnValue 20
FunctionEnd

View File

@@ -0,0 +1,373 @@
hlsl.semantic.vert
Shader version: 450
0:? Sequence
0:12 Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Parameters:
0:12 'ins' (in structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:? Sequence
0:14 Branch: Return with expression
0:14 's' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Definition: main( (temp void)
0:12 Function Parameters:
0:? Sequence
0:12 Sequence
0:12 move second child to first child (temp float)
0:12 clip: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:? 'clip' (layout(location=0 ) in float)
0:12 move second child to first child (temp float)
0:12 clip0: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:? 'clip0' (layout(location=1 ) in float)
0:12 move second child to first child (temp float)
0:12 clip7: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:? 'clip7' (layout(location=2 ) in float)
0:12 move second child to first child (temp float)
0:12 cull: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:? 'cull' (layout(location=3 ) in float)
0:12 move second child to first child (temp float)
0:12 cull2: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:? 'cull2' (layout(location=4 ) in float)
0:12 move second child to first child (temp float)
0:12 cull5: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 5 (const int)
0:? 'cull5' (layout(location=5 ) in float)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 6 (const int)
0:? 'ii' (in int InstanceIndex)
0:12 Sequence
0:12 move second child to first child (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip7: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull2: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull5: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 5 (const int)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:12 '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 ii: direct index for structure (temp int)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 6 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:? 'clip' (layout(location=0 ) in float)
0:? 'clip0' (layout(location=1 ) in float)
0:? 'clip7' (layout(location=2 ) in float)
0:? 'cull' (layout(location=3 ) in float)
0:? 'cull2' (layout(location=4 ) in float)
0:? 'cull5' (layout(location=5 ) in float)
0:? 'ii' (in int InstanceIndex)
Linked vertex stage:
Shader version: 450
0:? Sequence
0:12 Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Parameters:
0:12 'ins' (in structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:? Sequence
0:14 Branch: Return with expression
0:14 's' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Definition: main( (temp void)
0:12 Function Parameters:
0:? Sequence
0:12 Sequence
0:12 move second child to first child (temp float)
0:12 clip: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:? 'clip' (layout(location=0 ) in float)
0:12 move second child to first child (temp float)
0:12 clip0: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:? 'clip0' (layout(location=1 ) in float)
0:12 move second child to first child (temp float)
0:12 clip7: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:? 'clip7' (layout(location=2 ) in float)
0:12 move second child to first child (temp float)
0:12 cull: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:? 'cull' (layout(location=3 ) in float)
0:12 move second child to first child (temp float)
0:12 cull2: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:? 'cull2' (layout(location=4 ) in float)
0:12 move second child to first child (temp float)
0:12 cull5: direct index for structure (temp float)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 5 (const int)
0:? 'cull5' (layout(location=5 ) in float)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 6 (const int)
0:? 'ii' (in int InstanceIndex)
0:12 Sequence
0:12 move second child to first child (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:? 'ins' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip0: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 1 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_clip7' (out float ClipDistance)
0:12 clip7: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 2 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 3 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull2: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 4 (const int)
0:12 move second child to first child (temp float)
0:? '@entryPointOutput_cull5' (out float CullDistance)
0:12 cull5: direct index for structure (temp float)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 5 (const int)
0:12 move second child to first child (temp int)
0:12 ii: direct index for structure (temp int)
0:12 '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:12 Constant:
0:12 0 (const int)
0:12 ii: direct index for structure (temp int)
0:12 'flattenTemp' (temp structure{temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii})
0:12 Constant:
0:12 6 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int ii})
0:? 'clip' (layout(location=0 ) in float)
0:? 'clip0' (layout(location=1 ) in float)
0:? 'clip7' (layout(location=2 ) in float)
0:? 'cull' (layout(location=3 ) in float)
0:? 'cull2' (layout(location=4 ) in float)
0:? 'cull5' (layout(location=5 ) in float)
0:? 'ii' (in int InstanceIndex)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 77
Capability Shader
Capability ClipDistance
Capability CullDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 21 26 30 34 38 42 47 56 63 72
Name 4 "main"
Name 8 "S"
MemberName 8(S) 0 "clip"
MemberName 8(S) 1 "clip0"
MemberName 8(S) 2 "clip7"
MemberName 8(S) 3 "cull"
MemberName 8(S) 4 "cull2"
MemberName 8(S) 5 "cull5"
MemberName 8(S) 6 "ii"
Name 12 "@main(struct-S-f1-f1-f1-f1-f1-f1-i11;"
Name 11 "ins"
Name 14 "s"
Name 18 "ins"
Name 21 "clip"
Name 26 "clip0"
Name 30 "clip7"
Name 34 "cull"
Name 38 "cull2"
Name 42 "cull5"
Name 47 "ii"
Name 51 "flattenTemp"
Name 52 "param"
Name 56 "@entryPointOutput_clip7"
Name 63 "@entryPointOutput_cull5"
Name 70 "S"
MemberName 70(S) 0 "ii"
Name 72 "@entryPointOutput"
Decorate 21(clip) Location 0
Decorate 26(clip0) Location 1
Decorate 30(clip7) Location 2
Decorate 34(cull) Location 3
Decorate 38(cull2) Location 4
Decorate 42(cull5) Location 5
Decorate 47(ii) BuiltIn InstanceIndex
Decorate 56(@entryPointOutput_clip7) BuiltIn ClipDistance
Decorate 63(@entryPointOutput_cull5) BuiltIn CullDistance
Decorate 72(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeInt 32 1
8(S): TypeStruct 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 7(int)
9: TypePointer Function 8(S)
10: TypeFunction 8(S) 9(ptr)
19: 7(int) Constant 0
20: TypePointer Input 6(float)
21(clip): 20(ptr) Variable Input
23: TypePointer Function 6(float)
25: 7(int) Constant 1
26(clip0): 20(ptr) Variable Input
29: 7(int) Constant 2
30(clip7): 20(ptr) Variable Input
33: 7(int) Constant 3
34(cull): 20(ptr) Variable Input
37: 7(int) Constant 4
38(cull2): 20(ptr) Variable Input
41: 7(int) Constant 5
42(cull5): 20(ptr) Variable Input
45: 7(int) Constant 6
46: TypePointer Input 7(int)
47(ii): 46(ptr) Variable Input
49: TypePointer Function 7(int)
55: TypePointer Output 6(float)
56(@entryPointOutput_clip7): 55(ptr) Variable Output
63(@entryPointOutput_cull5): 55(ptr) Variable Output
70(S): TypeStruct 7(int)
71: TypePointer Output 70(S)
72(@entryPointOutput): 71(ptr) Variable Output
75: TypePointer Output 7(int)
4(main): 2 Function None 3
5: Label
18(ins): 9(ptr) Variable Function
51(flattenTemp): 9(ptr) Variable Function
52(param): 9(ptr) Variable Function
22: 6(float) Load 21(clip)
24: 23(ptr) AccessChain 18(ins) 19
Store 24 22
27: 6(float) Load 26(clip0)
28: 23(ptr) AccessChain 18(ins) 25
Store 28 27
31: 6(float) Load 30(clip7)
32: 23(ptr) AccessChain 18(ins) 29
Store 32 31
35: 6(float) Load 34(cull)
36: 23(ptr) AccessChain 18(ins) 33
Store 36 35
39: 6(float) Load 38(cull2)
40: 23(ptr) AccessChain 18(ins) 37
Store 40 39
43: 6(float) Load 42(cull5)
44: 23(ptr) AccessChain 18(ins) 41
Store 44 43
48: 7(int) Load 47(ii)
50: 49(ptr) AccessChain 18(ins) 45
Store 50 48
53: 8(S) Load 18(ins)
Store 52(param) 53
54: 8(S) FunctionCall 12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;) 52(param)
Store 51(flattenTemp) 54
57: 23(ptr) AccessChain 51(flattenTemp) 19
58: 6(float) Load 57
Store 56(@entryPointOutput_clip7) 58
59: 23(ptr) AccessChain 51(flattenTemp) 25
60: 6(float) Load 59
Store 56(@entryPointOutput_clip7) 60
61: 23(ptr) AccessChain 51(flattenTemp) 29
62: 6(float) Load 61
Store 56(@entryPointOutput_clip7) 62
64: 23(ptr) AccessChain 51(flattenTemp) 33
65: 6(float) Load 64
Store 63(@entryPointOutput_cull5) 65
66: 23(ptr) AccessChain 51(flattenTemp) 37
67: 6(float) Load 66
Store 63(@entryPointOutput_cull5) 67
68: 23(ptr) AccessChain 51(flattenTemp) 41
69: 6(float) Load 68
Store 63(@entryPointOutput_cull5) 69
73: 49(ptr) AccessChain 51(flattenTemp) 45
74: 7(int) Load 73
76: 75(ptr) AccessChain 72(@entryPointOutput) 19
Store 76 74
Return
FunctionEnd
12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;): 8(S) Function None 10
11(ins): 9(ptr) FunctionParameter
13: Label
14(s): 9(ptr) Variable Function
15: 8(S) Load 14(s)
ReturnValue 15
FunctionEnd

View File

@@ -0,0 +1,199 @@
hlsl.staticMemberFunction.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: Test::staticMemFun(vf4; (global 4-component vector of float)
0:5 Function Parameters:
0:5 'a' (in 4-component vector of float)
0:? Sequence
0:6 Branch: Return with expression
0:6 vector-scale (temp 4-component vector of float)
0:6 Constant:
0:6 2.000000
0:6 'a' (in 4-component vector of float)
0:9 Function Definition: Test::staticMemFun(i1; (global int)
0:9 Function Parameters:
0:9 'a' (in int)
0:? Sequence
0:10 Branch: Return with expression
0:10 add (temp int)
0:10 Constant:
0:10 2 (const int)
0:10 'a' (in int)
0:16 Function Definition: @main( (temp 4-component vector of float)
0:16 Function Parameters:
0:? Sequence
0:18 Sequence
0:18 move second child to first child (temp 4-component vector of float)
0:18 'f4' (temp 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 1.000000
0:? 1.000000
0:? 1.000000
0:19 add second child into first child (temp 4-component vector of float)
0:19 'f4' (temp 4-component vector of float)
0:19 Function Call: Test::staticMemFun(vf4; (global 4-component vector of float)
0:? Constant:
0:? 5.000000
0:? 5.000000
0:? 5.000000
0:? 5.000000
0:20 add second child into first child (temp 4-component vector of float)
0:20 'f4' (temp 4-component vector of float)
0:20 Convert int to float (temp float)
0:20 Function Call: Test::staticMemFun(i1; (global int)
0:20 Constant:
0:20 7 (const int)
0:21 Branch: Return with expression
0:21 'f4' (temp 4-component vector of float)
0:16 Function Definition: main( (temp void)
0:16 Function Parameters:
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:16 Function Call: @main( (temp 4-component vector of float)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: Test::staticMemFun(vf4; (global 4-component vector of float)
0:5 Function Parameters:
0:5 'a' (in 4-component vector of float)
0:? Sequence
0:6 Branch: Return with expression
0:6 vector-scale (temp 4-component vector of float)
0:6 Constant:
0:6 2.000000
0:6 'a' (in 4-component vector of float)
0:9 Function Definition: Test::staticMemFun(i1; (global int)
0:9 Function Parameters:
0:9 'a' (in int)
0:? Sequence
0:10 Branch: Return with expression
0:10 add (temp int)
0:10 Constant:
0:10 2 (const int)
0:10 'a' (in int)
0:16 Function Definition: @main( (temp 4-component vector of float)
0:16 Function Parameters:
0:? Sequence
0:18 Sequence
0:18 move second child to first child (temp 4-component vector of float)
0:18 'f4' (temp 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 1.000000
0:? 1.000000
0:? 1.000000
0:19 add second child into first child (temp 4-component vector of float)
0:19 'f4' (temp 4-component vector of float)
0:19 Function Call: Test::staticMemFun(vf4; (global 4-component vector of float)
0:? Constant:
0:? 5.000000
0:? 5.000000
0:? 5.000000
0:? 5.000000
0:20 add second child into first child (temp 4-component vector of float)
0:20 'f4' (temp 4-component vector of float)
0:20 Convert int to float (temp float)
0:20 Function Call: Test::staticMemFun(i1; (global int)
0:20 Constant:
0:20 7 (const int)
0:21 Branch: Return with expression
0:21 'f4' (temp 4-component vector of float)
0:16 Function Definition: main( (temp void)
0:16 Function Parameters:
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:16 Function Call: @main( (temp 4-component vector of float)
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 54
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 52
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 11 "Test::staticMemFun(vf4;"
Name 10 "a"
Name 17 "Test::staticMemFun(i1;"
Name 16 "a"
Name 20 "@main("
Name 32 "f4"
Name 37 "param"
Name 42 "param"
Name 52 "@entryPointOutput"
Decorate 52(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
9: TypeFunction 7(fvec4) 8(ptr)
13: TypeInt 32 1
14: TypePointer Function 13(int)
15: TypeFunction 13(int) 14(ptr)
19: TypeFunction 7(fvec4)
22: 6(float) Constant 1073741824
27: 13(int) Constant 2
33: 6(float) Constant 1065353216
34: 7(fvec4) ConstantComposite 33 33 33 33
35: 6(float) Constant 1084227584
36: 7(fvec4) ConstantComposite 35 35 35 35
41: 13(int) Constant 7
51: TypePointer Output 7(fvec4)
52(@entryPointOutput): 51(ptr) Variable Output
4(main): 2 Function None 3
5: Label
53: 7(fvec4) FunctionCall 20(@main()
Store 52(@entryPointOutput) 53
Return
FunctionEnd
11(Test::staticMemFun(vf4;): 7(fvec4) Function None 9
10(a): 8(ptr) FunctionParameter
12: Label
23: 7(fvec4) Load 10(a)
24: 7(fvec4) VectorTimesScalar 23 22
ReturnValue 24
FunctionEnd
17(Test::staticMemFun(i1;): 13(int) Function None 15
16(a): 14(ptr) FunctionParameter
18: Label
28: 13(int) Load 16(a)
29: 13(int) IAdd 27 28
ReturnValue 29
FunctionEnd
20(@main(): 7(fvec4) Function None 19
21: Label
32(f4): 8(ptr) Variable Function
37(param): 8(ptr) Variable Function
42(param): 14(ptr) Variable Function
Store 32(f4) 34
Store 37(param) 36
38: 7(fvec4) FunctionCall 11(Test::staticMemFun(vf4;) 37(param)
39: 7(fvec4) Load 32(f4)
40: 7(fvec4) FAdd 39 38
Store 32(f4) 40
Store 42(param) 41
43: 13(int) FunctionCall 17(Test::staticMemFun(i1;) 42(param)
44: 6(float) ConvertSToF 43
45: 7(fvec4) Load 32(f4)
46: 7(fvec4) CompositeConstruct 44 44 44 44
47: 7(fvec4) FAdd 45 46
Store 32(f4) 47
48: 7(fvec4) Load 32(f4)
ReturnValue 48
FunctionEnd

View File

@@ -86,6 +86,7 @@ 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{})
Linked geometry stage:
@@ -178,15 +179,16 @@ 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{})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 63
// Id's are bound by 67
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 46
EntryPoint Geometry 4 "main" 46 66
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
@@ -206,7 +208,10 @@ output primitive = triangle_strip
Name 58 "ts"
Name 59 "param"
Name 61 "param"
Name 63 "PS_IN"
Name 66 "i"
Decorate 46(i_pos) BuiltIn Position
Decorate 66(i) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -231,6 +236,10 @@ output primitive = triangle_strip
46(i_pos): 45(ptr) Variable Input
47: TypePointer Input 7(fvec4)
54: 20(int) Constant 2
63(PS_IN): TypeStruct
64: TypeArray 63(PS_IN) 10
65: TypePointer Input 64
66(i): 65(ptr) Variable Input
4(main): 2 Function None 3
5: Label
43(i): 12(ptr) Variable Function

View File

@@ -42,6 +42,7 @@ Shader version: 450
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)
@@ -92,17 +93,18 @@ Shader version: 450
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 45
// Id's are bound by 48
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 31 35 38
EntryPoint Vertex 4 "main" 31 35 38 47
Name 4 "main"
Name 8 "VS_INPUT"
MemberName 8(VS_INPUT) 0 "Pos_in"
@@ -119,9 +121,12 @@ Shader version: 450
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
@@ -139,6 +144,9 @@ Shader version: 450
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

@@ -2,59 +2,59 @@ hlsl.structbuffer.fn.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:9 Function Parameters:
0:9 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:9 'bufferOffset' (in uint)
0:5 Function Definition: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:5 Function Parameters:
0:5 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:5 'bufferOffset' (in uint)
0:? Sequence
0:10 Branch: Return with expression
0:10 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:10 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:10 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:10 Constant:
0:10 0 (const uint)
0:10 'bufferOffset' (in uint)
0:14 Function Definition: set(block--vu4[0]1;u1;vu4; (temp void)
0:14 Function Parameters:
0:14 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:14 'bufferOffset' (in uint)
0:14 'data' (in 4-component vector of uint)
0:6 Branch: Return with expression
0:6 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:6 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:6 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:6 Constant:
0:6 0 (const uint)
0:6 'bufferOffset' (in uint)
0:10 Function Definition: set(block--vu4[0]1;u1;vu4; (temp void)
0:10 Function Parameters:
0:10 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:10 'bufferOffset' (in uint)
0:10 'data' (in 4-component vector of uint)
0:? Sequence
0:15 move second child to first child (temp 4-component vector of uint)
0:15 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:15 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:15 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:15 Constant:
0:15 0 (const uint)
0:15 'bufferOffset' (in uint)
0:15 'data' (in 4-component vector of uint)
0:19 Function Definition: @main(u1; (temp 4-component vector of float)
0:19 Function Parameters:
0:19 'pos' (in uint)
0:11 move second child to first child (temp 4-component vector of uint)
0:11 indirect index (buffer 4-component vector of uint)
0:11 @data: direct index for structure (buffer implicitly-sized array of 4-component vector of uint)
0:11 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:11 Constant:
0:11 0 (const uint)
0:11 'bufferOffset' (in uint)
0:11 'data' (in 4-component vector of uint)
0:20 Function Definition: @main(u1; (temp 4-component vector of float)
0:20 Function Parameters:
0:20 'pos' (in uint)
0:? Sequence
0:20 Function Call: set(block--vu4[0]1;u1;vu4; (temp void)
0:20 'sbuf2' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:20 Constant:
0:20 2 (const uint)
0:20 Function Call: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:20 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:20 Constant:
0:20 3 (const uint)
0:22 Branch: Return with expression
0:22 Constant:
0:22 0.000000
0:22 0.000000
0:22 0.000000
0:22 0.000000
0:19 Function Definition: main( (temp void)
0:19 Function Parameters:
0:21 Function Call: set(block--vu4[0]1;u1;vu4; (temp void)
0:21 'sbuf2' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:21 Constant:
0:21 2 (const uint)
0:21 Function Call: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:21 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:21 Constant:
0:21 3 (const uint)
0:23 Branch: Return with expression
0:23 Constant:
0:23 0.000000
0:23 0.000000
0:23 0.000000
0:23 0.000000
0:20 Function Definition: main( (temp void)
0:20 Function Parameters:
0:? Sequence
0:19 move second child to first child (temp uint)
0:20 move second child to first child (temp uint)
0:? 'pos' (temp uint)
0:? 'pos' (layout(location=0 ) in uint)
0:19 move second child to first child (temp 4-component vector of float)
0:20 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:19 Function Call: @main(u1; (temp 4-component vector of float)
0:20 Function Call: @main(u1; (temp 4-component vector of float)
0:? 'pos' (temp uint)
0:? Linker Objects
0:? 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
@@ -70,59 +70,59 @@ Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:9 Function Parameters:
0:9 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:9 'bufferOffset' (in uint)
0:5 Function Definition: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:5 Function Parameters:
0:5 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:5 'bufferOffset' (in uint)
0:? Sequence
0:10 Branch: Return with expression
0:10 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:10 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:10 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:10 Constant:
0:10 0 (const uint)
0:10 'bufferOffset' (in uint)
0:14 Function Definition: set(block--vu4[0]1;u1;vu4; (temp void)
0:14 Function Parameters:
0:14 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:14 'bufferOffset' (in uint)
0:14 'data' (in 4-component vector of uint)
0:6 Branch: Return with expression
0:6 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:6 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:6 'sb' (layout(row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:6 Constant:
0:6 0 (const uint)
0:6 'bufferOffset' (in uint)
0:10 Function Definition: set(block--vu4[0]1;u1;vu4; (temp void)
0:10 Function Parameters:
0:10 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:10 'bufferOffset' (in uint)
0:10 'data' (in 4-component vector of uint)
0:? Sequence
0:15 move second child to first child (temp 4-component vector of uint)
0:15 indirect index (layout(row_major std430 ) buffer 4-component vector of uint)
0:15 @data: direct index for structure (layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint)
0:15 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:15 Constant:
0:15 0 (const uint)
0:15 'bufferOffset' (in uint)
0:15 'data' (in 4-component vector of uint)
0:19 Function Definition: @main(u1; (temp 4-component vector of float)
0:19 Function Parameters:
0:19 'pos' (in uint)
0:11 move second child to first child (temp 4-component vector of uint)
0:11 indirect index (buffer 4-component vector of uint)
0:11 @data: direct index for structure (buffer implicitly-sized array of 4-component vector of uint)
0:11 'sb' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:11 Constant:
0:11 0 (const uint)
0:11 'bufferOffset' (in uint)
0:11 'data' (in 4-component vector of uint)
0:20 Function Definition: @main(u1; (temp 4-component vector of float)
0:20 Function Parameters:
0:20 'pos' (in uint)
0:? Sequence
0:20 Function Call: set(block--vu4[0]1;u1;vu4; (temp void)
0:20 'sbuf2' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:20 Constant:
0:20 2 (const uint)
0:20 Function Call: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:20 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:20 Constant:
0:20 3 (const uint)
0:22 Branch: Return with expression
0:22 Constant:
0:22 0.000000
0:22 0.000000
0:22 0.000000
0:22 0.000000
0:19 Function Definition: main( (temp void)
0:19 Function Parameters:
0:21 Function Call: set(block--vu4[0]1;u1;vu4; (temp void)
0:21 'sbuf2' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:21 Constant:
0:21 2 (const uint)
0:21 Function Call: get(block--vu4[0]1;u1; (temp 4-component vector of uint)
0:21 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})
0:21 Constant:
0:21 3 (const uint)
0:23 Branch: Return with expression
0:23 Constant:
0:23 0.000000
0:23 0.000000
0:23 0.000000
0:23 0.000000
0:20 Function Definition: main( (temp void)
0:20 Function Parameters:
0:? Sequence
0:19 move second child to first child (temp uint)
0:20 move second child to first child (temp uint)
0:? 'pos' (temp uint)
0:? 'pos' (layout(location=0 ) in uint)
0:19 move second child to first child (temp 4-component vector of float)
0:20 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:19 Function Call: @main(u1; (temp 4-component vector of float)
0:20 Function Call: @main(u1; (temp 4-component vector of float)
0:? 'pos' (temp uint)
0:? Linker Objects
0:? 'sbuf' (layout(binding=10 row_major std430 ) readonly buffer block{layout(row_major std430 ) buffer implicitly-sized array of 4-component vector of uint @data})

View File

@@ -0,0 +1,66 @@
spv.pushConstantAnon.vert
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 38
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 24
Source GLSL 400
Name 4 "main"
Name 11 "Material"
MemberName 11(Material) 0 "kind"
MemberName 11(Material) 1 "fa"
Name 13 ""
Name 24 "color"
Decorate 10 ArrayStride 4
MemberDecorate 11(Material) 0 Offset 0
MemberDecorate 11(Material) 1 Offset 4
Decorate 11(Material) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeFloat 32
8: TypeInt 32 0
9: 8(int) Constant 3
10: TypeArray 7(float) 9
11(Material): TypeStruct 6(int) 10
12: TypePointer PushConstant 11(Material)
13: 12(ptr) Variable PushConstant
14: 6(int) Constant 0
15: TypePointer PushConstant 6(int)
22: TypeVector 7(float) 4
23: TypePointer Output 22(fvec4)
24(color): 23(ptr) Variable Output
25: 7(float) Constant 1045220557
26: 22(fvec4) ConstantComposite 25 25 25 25
28: 7(float) Constant 1056964608
29: 22(fvec4) ConstantComposite 28 28 28 28
31: 6(int) Constant 1
32: TypePointer PushConstant 7(float)
4(main): 2 Function None 3
5: Label
16: 15(ptr) AccessChain 13 14
17: 6(int) Load 16
SelectionMerge 21 None
Switch 17 20
case 1: 18
case 2: 19
20: Label
33: 32(ptr) AccessChain 13 31 31
34: 7(float) Load 33
35: 22(fvec4) CompositeConstruct 34 34 34 34
Store 24(color) 35
Branch 21
18: Label
Store 24(color) 26
Branch 21
19: Label
Store 24(color) 29
Branch 21
21: Label
Return
FunctionEnd

View File

@@ -19,7 +19,6 @@ ERROR: 0:39: 'push_constant' : can only be used with a uniform
ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
ERROR: 0:43: 'push_constant' : can only be used with a block
ERROR: 0:45: 'push_constant' : cannot declare a default, can only be used on a block
ERROR: 0:47: 'push_constant' : requires an instance name
ERROR: 0:52: 'input_attachment_index' : can only be used with a subpass
ERROR: 0:53: 'input_attachment_index' : can only be used with a subpass
ERROR: 0:54: 'subpass' : requires an input_attachment_index layout qualifier
@@ -41,7 +40,7 @@ ERROR: 0:93: ',' : sampler constructor must appear at point of use
ERROR: 0:94: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp sampler2D' and a right operand of type 'temp sampler2D' (or there is no acceptable conversion)
ERROR: 0:94: 'call argument' : sampler constructor must appear at point of use
ERROR: 0:96: 'gl_NumSamples' : undeclared identifier
ERROR: 39 compilation errors. No code generated.
ERROR: 38 compilation errors. No code generated.
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage

View File

@@ -29,10 +29,10 @@ uniform float2 c2;
uniform float3 c3;
uniform float4 c4;
uniform int o1;
uniform int2 o2;
uniform int3 o3;
uniform int4 o4;
PS_OUTPUT main()
{
@@ -42,69 +42,72 @@ PS_OUTPUT main()
// no 1D gathers
float4 txval001 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2);
int4 txval011 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2);
uint4 txval021 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2);
float4 txval001 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0));
int4 txval011 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1));
uint4 txval021 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1));
float4 txval004 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
int4 txval014 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
uint4 txval024 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
float4 txval004 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
int4 txval014 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1), int2(1,-1), int2(1,-1), int2(1,-1));
uint4 txval024 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1), int2(1,1), int2(1,1), int2(1,1));
// float4 txval00s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, status);
// int4 txval01s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, status);
// uint4 txval02s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, status);
// float4 txval00s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// int4 txval01s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// uint4 txval02s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status);
// float4 txval004s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// int4 txval014s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// uint4 txval024s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// float4 txval004s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// int4 txval014s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// uint4 txval024s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2);
int4 txval111 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2);
uint4 txval121 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2);
// GatherCmpGreen not implemented pending OpImageDrefGather component input
// float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
// int4 txval111 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
// uint4 txval121 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
// float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// float4 txval10s = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, status);
// int4 txval11s = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, status);
// uint4 txval12s = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, status);
// float4 txval10s = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
// int4 txval11s = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
// uint4 txval12s = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
// float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
float4 txval201 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2);
int4 txval211 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2);
uint4 txval221 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2);
// GatherCmpBlue not implemented pending OpImageDrefGather component input
// float4 txval201 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
// int4 txval211 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
// uint4 txval221 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
float4 txval204 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
int4 txval214 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
uint4 txval224 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
// float4 txval204 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// int4 txval214 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// uint4 txval224 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// float4 txval204s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// int4 txval214s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// uint4 txval224s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// float4 txval204s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// int4 txval214s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// uint4 txval224s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// float4 txval20s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, status);
// int4 txval21s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, status);
// uint4 txval22s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, o2, status);
// float4 txval20s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
// int4 txval21s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
// uint4 txval22s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
float4 txval301 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2);
int4 txval311 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2);
uint4 txval321 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2);
// GatherCmpAlpha not implemented pending OpImageDrefGather component input
// float4 txval301 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
// int4 txval311 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
// uint4 txval321 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
float4 txval304 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
int4 txval314 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
uint4 txval324 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2);
// float4 txval304 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// int4 txval314 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// uint4 txval324 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
// float4 txval304s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// int4 txval314s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// uint4 txval324s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, o2, o2, o2, status);
// float4 txval304s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// int4 txval314s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// uint4 txval324s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
// float4 txval30s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, status);
// int4 txval31s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, status);
// uint4 txval32s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, o2, status);
// float4 txval30s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
// int4 txval31s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
// uint4 txval32s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
// no 3D gathers with offset

View File

@@ -30,4 +30,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0
if (float ii = input.z)
++ii;
++ii;
if (float(ii) == 1.0)
++ii;
}

View File

@@ -0,0 +1,15 @@
struct S {
float clip0 : SV_ClipDistance0;
float cull0 : SV_CullDistance0;
uint vpai : SV_ViewportArrayIndex;
uint rtai : SV_RenderTargetArrayIndex;
int ii : SV_InstanceID;
};
[maxvertexcount(4)]
S main(triangle in uint VertexID[3] : VertexID,
inout LineStream<S> OutputStream)
{
S s;
return s;
}

View File

@@ -0,0 +1,15 @@
struct S {
float clip : SV_ClipDistance;
float clip0 : SV_ClipDistance0;
float clip7 : SV_ClipDistance7;
float cull : SV_CullDistance;
float cull2 : SV_CullDistance2;
float cull5 : SV_CullDistance5;
int ii : SV_InstanceID;
};
S main(S ins)
{
S s;
return s;
}

View File

@@ -0,0 +1,22 @@
struct Test
{
float4 memVar;
static float4 staticMemFun(float4 a) : SV_Position
{
return 2 * a;
}
static int staticMemFun(int a) : SV_Position
{
return 2 + a;
}
int i;
};
float4 main() : SV_Target0
{
Test test;
float4 f4 = float4(1.0,1.0,1.0,1.0);
f4 += Test::staticMemFun(float4(5.0f,5.0f,5.0f,5.0f));
f4 += Test::staticMemFun(7);
return f4;
}

View File

@@ -1,9 +1,5 @@
StructuredBuffer<uint4> sbuf : register(t10);
RWStructuredBuffer<uint4> sbuf2;
// Not shared, because of type difference.
StructuredBuffer<uint3> sbuf3 : register(t12);
uint4 get(in StructuredBuffer<uint4> sb, uint bufferOffset)
{
@@ -15,6 +11,11 @@ void set(in RWStructuredBuffer<uint4> sb, uint bufferOffset, uint4 data)
sb[bufferOffset] = data;
}
RWStructuredBuffer<uint4> sbuf2;
// Not shared, because of type difference.
StructuredBuffer<uint3> sbuf3 : register(t12);
float4 main(uint pos : FOO) : SV_Target0
{
set(sbuf2, 2, get(sbuf, 3));

View File

@@ -0,0 +1,17 @@
#version 400
layout(push_constant) uniform Material {
int kind;
float fa[3];
};
out vec4 color;
void main()
{
switch (kind) {
case 1: color = vec4(0.2); break;
case 2: color = vec4(0.5); break;
default: color = vec4(fa[1]); break;
}
}

View File

@@ -46,7 +46,7 @@ layout(push_constant) uniform; // ERROR, needs an object
layout(push_constant) uniform pcb2 {
int a;
}; // ERROR, no instance name
}; // Okay now to have no instance name
layout(input_attachment_index = 2) uniform subpassInput subD;
layout(input_attachment_index = 3) uniform texture2D subDbad1; // ERROR, not a texture

View File

@@ -218,6 +218,7 @@ enum TBuiltInVariable {
// to one of the above.
EbvFragDepthGreater,
EbvFragDepthLesser,
EbvStencilRef,
EbvLast
};

View File

@@ -183,6 +183,7 @@ enum TOperator {
EOpVectorSwizzle,
EOpMethod,
EOpScoping,
//
// Built-in functions mapped to operators

View File

@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1875"
#define GLSLANG_DATE "03-Mar-2017"
#define GLSLANG_REVISION "Overload400-PrecQual.1899"
#define GLSLANG_DATE "11-Mar-2017"

View File

@@ -1158,15 +1158,15 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
return nullptr;
TIntermAggregate* aggNode = nullptr;
if (left)
if (left != nullptr)
aggNode = left->getAsAggregate();
if (! aggNode || aggNode->getOp() != EOpNull) {
if (aggNode == nullptr || aggNode->getOp() != EOpNull) {
aggNode = new TIntermAggregate;
if (left)
if (left != nullptr)
aggNode->getSequence().push_back(left);
}
if (right)
if (right != nullptr)
aggNode->getSequence().push_back(right);
return aggNode;

View File

@@ -5797,11 +5797,8 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
error(loc, "cannot use sample qualifier on an interface block", "sample", "");
if (qualifier.invariant)
error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
if (qualifier.layoutPushConstant) {
if (qualifier.layoutPushConstant)
intermediate.addPushConstantCount();
if (! instanceName)
error(loc, "requires an instance name", "push_constant", "");
}
}
//

View File

@@ -701,6 +701,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
case PpAtomDecrement: return DEC_OP;
case PpAtomIncrement: return INC_OP;
case PpAtomColonColon:
parseContext.error(loc, "not supported", "::", "");
break;
case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT;
case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT;

View File

@@ -332,6 +332,19 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_GOOGLE_include_directive 1\n"
;
if (version >= 150) {
// define GL_core_profile and GL_compatibility_profile
preamble +=
"#define GL_core_profile 1\n"
;
if (profile == ECompatibilityProfile) {
preamble +=
"#define GL_compatibility_profile 1\n"
;
}
}
// #define VULKAN XXXX
const int numberBufSize = 12;
char numberBuf[numberBufSize];

View File

@@ -120,6 +120,8 @@ const struct {
{ PpAtomDecrement, "--" },
{ PpAtomIncrement, "++" },
{ PpAtomColonColon, "::" },
{ PpAtomDefine, "define" },
{ PpAtomUndef, "undef" },
{ PpAtomIf, "if" },

View File

@@ -691,6 +691,12 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
pp->parseContext.ppError(ppToken->loc, "End of line in string", "string", "");
}
return PpAtomConstString;
case ':':
ch = getch();
if (ch == ':')
return PpAtomColonColon;
ungetch();
return ':';
}
ch = getch();

View File

@@ -117,6 +117,8 @@ enum EFixedAtoms {
PpAtomDecrement,
PpAtomIncrement,
PpAtomColonColon,
PpAtomPaste,
// Constants

View File

@@ -111,6 +111,7 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.gather.basic.dx10.vert", "main"},
{"hlsl.gather.offset.dx10.frag", "main"},
{"hlsl.gather.offsetarray.dx10.frag", "main"},
{"hlsl.gathercmpRGBA.offset.dx10.frag", "main"},
{"hlsl.gatherRGBA.array.dx10.frag", "main"},
{"hlsl.gatherRGBA.basic.dx10.frag", "main"},
{"hlsl.gatherRGBA.offset.dx10.frag", "main"},
@@ -211,6 +212,7 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.semicolons.frag", "main"},
{"hlsl.shapeConv.frag", "main"},
{"hlsl.shapeConvRet.frag", "main"},
{"hlsl.staticMemberFunction.frag", "main"},
{"hlsl.stringtoken.frag", "main"},
{"hlsl.string.frag", "main"},
{"hlsl.struct.split-1.vert", "main"},
@@ -239,6 +241,8 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.max.frag", "PixelShaderFunction"},
{"hlsl.precedence.frag", "PixelShaderFunction"},
{"hlsl.precedence2.frag", "PixelShaderFunction"},
{"hlsl.semantic.geom", "main"},
{"hlsl.semantic.vert", "main"},
{"hlsl.scope.frag", "PixelShaderFunction"},
{"hlsl.sin.frag", "PixelShaderFunction"},
{"hlsl.struct.frag", "PixelShaderFunction"},

View File

@@ -295,6 +295,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.separate.frag",
"spv.shortCircuit.frag",
"spv.pushConstant.vert",
"spv.pushConstantAnon.vert",
"spv.subpass.frag",
"spv.specConstant.vert",
"spv.specConstant.comp",

View File

@@ -131,18 +131,13 @@ bool HlslGrammar::acceptCompilationUnit()
continue;
// externalDeclaration
TIntermNode* declarationNode1;
TIntermNode* declarationNode2 = nullptr; // sometimes the grammar for a single declaration creates two
if (! acceptDeclaration(declarationNode1, declarationNode2))
if (! acceptDeclaration(unitNode))
return false;
// hook it up
unitNode = intermediate.growAggregate(unitNode, declarationNode1);
if (declarationNode2 != nullptr)
unitNode = intermediate.growAggregate(unitNode, declarationNode2);
}
// set root of AST
if (unitNode && !unitNode->getAsAggregate())
unitNode = intermediate.growAggregate(nullptr, unitNode);
intermediate.setTreeRoot(unitNode);
return true;
@@ -292,22 +287,18 @@ bool HlslGrammar::acceptSamplerDeclarationDX9(TType& /*type*/)
// as above. (The 'identifier' in the first item in init_declarator list is the
// same as 'identifier' for function declarations.)
//
// 'node' could get populated if the declaration creates code, like an initializer
// or a function body.
// This can generate more than one subtree, one per initializer or a function body.
// All initializer subtrees are put in their own aggregate node, making one top-level
// node for all the initializers. Each function created is a top-level node to grow
// into the passed-in nodeList.
//
// 'node2' could get populated with a second decoration tree if a single source declaration
// leads to two subtrees that need to be peers higher up.
// If 'nodeList' is passed in as non-null, it must an aggregate to extend for
// each top-level node the declaration creates. Otherwise, if only one top-level
// node in generated here, that is want is returned in nodeList.
//
bool HlslGrammar::acceptDeclaration(TIntermNode*& node)
bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList)
{
TIntermNode* node2;
return acceptDeclaration(node, node2);
}
bool HlslGrammar::acceptDeclaration(TIntermNode*& node, TIntermNode*& node2)
{
node = nullptr;
node2 = nullptr;
bool list = false;
bool declarator_list = false; // true when processing comma separation
// attributes
TAttributeMap attributes;
@@ -324,35 +315,41 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node, TIntermNode*& node2)
// HLSL shaders, this will have to be a master level switch
// As such, the sampler keyword in D3D10+ turns into an automatic sampler type, and is commonly used
// For that reason, this line is commented out
// if (acceptSamplerDeclarationDX9(declaredType))
// return true;
// if (acceptSamplerDeclarationDX9(declaredType))
// return true;
// fully_specified_type
if (! acceptFullySpecifiedType(declaredType))
if (! acceptFullySpecifiedType(declaredType, nodeList))
return false;
// identifier
HlslToken idToken;
TIntermAggregate* initializers = nullptr;
while (acceptIdentifier(idToken)) {
TString* fnName = idToken.string;
if (peekTokenClass(EHTokLeftParen)) {
// looks like function parameters
TString* fnName = idToken.string;
// Potentially rename shader entry point function. No-op most of the time.
parseContext.renameShaderFunction(fnName);
// Potentially rename shader entry point function. No-op most of the time.
parseContext.renameShaderFunction(fnName);
// function_parameters
TFunction& function = *new TFunction(fnName, declaredType);
if (!acceptFunctionParameters(function)) {
expected("function parameter list");
return false;
}
// function_parameters
TFunction& function = *new TFunction(fnName, declaredType);
if (acceptFunctionParameters(function)) {
// post_decls
acceptPostDecls(function.getWritableType().getQualifier());
// compound_statement (function body definition) or just a prototype?
if (peekTokenClass(EHTokLeftBrace)) {
if (list)
if (declarator_list)
parseContext.error(idToken.loc, "function body can't be in a declarator list", "{", "");
if (typedefDecl)
parseContext.error(idToken.loc, "function body can't be in a typedef", "{", "");
return acceptFunctionDefinition(function, node, node2, attributes);
return acceptFunctionDefinition(function, nodeList, attributes);
} else {
if (typedefDecl)
parseContext.error(idToken.loc, "function typedefs not implemented", "{", "");
@@ -421,24 +418,29 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node, TIntermNode*& node2)
// Declare the variable and add any initializer code to the AST.
// The top-level node is always made into an aggregate, as that's
// historically how the AST has been.
node = intermediate.growAggregate(node,
parseContext.declareVariable(idToken.loc, *idToken.string, variableType,
expressionNode),
idToken.loc);
initializers = intermediate.growAggregate(initializers,
parseContext.declareVariable(idToken.loc, *idToken.string, variableType, expressionNode),
idToken.loc);
}
}
}
}
if (acceptTokenClass(EHTokComma)) {
list = true;
declarator_list = true;
continue;
}
};
// The top-level node is a sequence.
if (node != nullptr)
node->getAsAggregate()->setOperator(EOpSequence);
// The top-level initializer node is a sequence.
if (initializers != nullptr)
initializers->setOperator(EOpSequence);
// Add the initializers' aggregate to the nodeList we were handed.
if (nodeList)
nodeList = intermediate.growAggregate(nodeList, initializers);
else
nodeList = initializers;
// SEMICOLON
if (! acceptTokenClass(EHTokSemicolon)) {
@@ -469,6 +471,12 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node)
if (! acceptFullySpecifiedType(type))
return false;
// filter out type casts
if (peekTokenClass(EHTokLeftParen)) {
recedeToken();
return false;
}
// identifier
HlslToken idToken;
if (! acceptIdentifier(idToken)) {
@@ -499,6 +507,11 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node)
// | type_qualifier type_specifier
//
bool HlslGrammar::acceptFullySpecifiedType(TType& type)
{
TIntermNode* nodeList = nullptr;
return acceptFullySpecifiedType(type, nodeList);
}
bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList)
{
// type_qualifier
TQualifier qualifier;
@@ -508,7 +521,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type)
TSourceLoc loc = token.loc;
// type_specifier
if (! acceptType(type)) {
if (! acceptType(type, nodeList)) {
// If this is not a type, we may have inadvertently gone down a wrong path
// by parsing "sample", which can be treated like either an identifier or a
// qualifier. Back it out, if we did.
@@ -983,7 +996,7 @@ bool HlslGrammar::acceptAnnotations(TQualifier&)
break;
// declaration
TIntermNode* node;
TIntermNode* node = nullptr;
if (! acceptDeclaration(node)) {
expected("declaration in annotation");
return false;
@@ -1179,6 +1192,11 @@ bool HlslGrammar::acceptTextureType(TType& type)
// and return true and advance.
// Otherwise, return false, and don't advance
bool HlslGrammar::acceptType(TType& type)
{
TIntermNode* nodeList = nullptr;
return acceptType(type, nodeList);
}
bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList)
{
// Basic types for min* types, broken out here in case of future
// changes, e.g, to use native halfs.
@@ -1263,7 +1281,7 @@ bool HlslGrammar::acceptType(TType& type)
case EHTokStruct:
case EHTokCBuffer:
case EHTokTBuffer:
return acceptStruct(type);
return acceptStruct(type, nodeList);
case EHTokIdentifier:
// An identifier could be for a user-defined type.
@@ -1737,7 +1755,7 @@ bool HlslGrammar::acceptType(TType& type)
// | CBUFFER
// | TBUFFER
//
bool HlslGrammar::acceptStruct(TType& type)
bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList)
{
// This storage qualifier will tell us whether it's an AST
// block type or just a generic structure type.
@@ -1780,7 +1798,7 @@ bool HlslGrammar::acceptStruct(TType& type)
// struct_declaration_list
TTypeList* typeList;
if (! acceptStructDeclarationList(typeList)) {
if (! acceptStructDeclarationList(typeList, nodeList, structName)) {
expected("struct member declarations");
return false;
}
@@ -1874,6 +1892,7 @@ bool HlslGrammar::acceptStructBufferType(TType& type)
TArraySizes unsizedArray;
unsizedArray.addInnerSize(UnsizedArraySize);
templateType->newArraySizes(unsizedArray);
templateType->getQualifier().storage = storage;
// field name is canonical for all structbuffers
templateType->setFieldName("@data");
@@ -1904,12 +1923,14 @@ bool HlslGrammar::acceptStructBufferType(TType& type)
//
// struct_declaration
// : fully_specified_type struct_declarator COMMA struct_declarator ...
// | fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition
//
// struct_declarator
// : IDENTIFIER post_decls
// | IDENTIFIER array_specifier post_decls
// | IDENTIFIER function_parameters post_decls // member-function prototype
//
bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList)
bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode*& nodeList, const TString& typeName)
{
typeList = new TTypeList();
HlslToken idToken;
@@ -1920,51 +1941,66 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList)
return true;
// struct_declaration
bool declarator_list = false;
// fully_specified_type
TType memberType;
if (! acceptFullySpecifiedType(memberType)) {
if (! acceptFullySpecifiedType(memberType, nodeList)) {
expected("member type");
return false;
}
// struct_declarator COMMA struct_declarator ...
bool functionDefinitionAccepted = false;
do {
if (! acceptIdentifier(idToken)) {
expected("member name");
return false;
}
// add it to the list of members
TTypeLoc member = { new TType(EbtVoid), token.loc };
member.type->shallowCopy(memberType);
member.type->setFieldName(*idToken.string);
typeList->push_back(member);
if (peekTokenClass(EHTokLeftParen)) {
// function_parameters
if (!declarator_list) {
functionDefinitionAccepted = acceptMemberFunctionDefinition(nodeList, typeName, memberType, *idToken.string);
if (functionDefinitionAccepted)
break;
}
expected("member-function definition");
return false;
} else {
// add it to the list of members
TTypeLoc member = { new TType(EbtVoid), token.loc };
member.type->shallowCopy(memberType);
member.type->setFieldName(*idToken.string);
typeList->push_back(member);
// array_specifier
TArraySizes* arraySizes = nullptr;
acceptArraySpecifier(arraySizes);
if (arraySizes)
typeList->back().type->newArraySizes(*arraySizes);
// array_specifier
TArraySizes* arraySizes = nullptr;
acceptArraySpecifier(arraySizes);
if (arraySizes)
typeList->back().type->newArraySizes(*arraySizes);
acceptPostDecls(member.type->getQualifier());
acceptPostDecls(member.type->getQualifier());
// EQUAL assignment_expression
if (acceptTokenClass(EHTokAssign)) {
parseContext.warn(idToken.loc, "struct-member initializers ignored", "typedef", "");
TIntermTyped* expressionNode = nullptr;
if (! acceptAssignmentExpression(expressionNode)) {
expected("initializer");
return false;
// EQUAL assignment_expression
if (acceptTokenClass(EHTokAssign)) {
parseContext.warn(idToken.loc, "struct-member initializers ignored", "typedef", "");
TIntermTyped* expressionNode = nullptr;
if (! acceptAssignmentExpression(expressionNode)) {
expected("initializer");
return false;
}
}
}
// success on seeing the SEMICOLON coming up
if (peekTokenClass(EHTokSemicolon))
break;
// COMMA
if (! acceptTokenClass(EHTokComma)) {
if (acceptTokenClass(EHTokComma))
declarator_list = true;
else {
expected(",");
return false;
}
@@ -1972,7 +2008,7 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList)
} while (true);
// SEMI_COLON
if (! acceptTokenClass(EHTokSemicolon)) {
if (! functionDefinitionAccepted && ! acceptTokenClass(EHTokSemicolon)) {
expected(";");
return false;
}
@@ -1980,6 +2016,43 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList)
} while (true);
}
// member_function_definition
// | function_parameters post_decls compound_statement
//
// Expects type to have EvqGlobal for a static member and
// EvqTemporary for non-static member.
bool HlslGrammar::acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TString& typeName,
const TType& type, const TString& memberName)
{
// watch early returns...
parseContext.pushThis(typeName);
bool accepted = false;
TString* functionName = parseContext.getFullMemberFunctionName(memberName, type.getQualifier().storage == EvqGlobal);
TFunction& function = *new TFunction(functionName, type);
// function_parameters
if (acceptFunctionParameters(function)) {
// post_decls
acceptPostDecls(function.getWritableType().getQualifier());
// compound_statement (function body definition)
if (peekTokenClass(EHTokLeftBrace)) {
if (function.getType().getQualifier().storage != EvqGlobal) {
expected("only static member functions are accepted");
return false;
}
TAttributeMap attributes;
accepted = acceptFunctionDefinition(function, nodeList, attributes);
}
} else
expected("function parameter list");
parseContext.popThis();
return accepted;
}
// function_parameters
// : LEFT_PAREN parameter_declaration COMMA parameter_declaration ... RIGHT_PAREN
// | LEFT_PAREN VOID RIGHT_PAREN
@@ -2107,20 +2180,29 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
// Do the work to create the function definition in addition to
// parsing the body (compound_statement).
bool HlslGrammar::acceptFunctionDefinition(TFunction& function, TIntermNode*& node, TIntermNode*& node2, const TAttributeMap& attributes)
bool HlslGrammar::acceptFunctionDefinition(TFunction& function, TIntermNode*& nodeList, const TAttributeMap& attributes)
{
TFunction& functionDeclarator = parseContext.handleFunctionDeclarator(token.loc, function, false /* not prototype */);
TSourceLoc loc = token.loc;
// we might get back and entry-point
TIntermNode* entryPointNode = nullptr;
// This does a pushScope()
node = parseContext.handleFunctionDefinition(loc, functionDeclarator, attributes, node2);
TIntermNode* functionNode = parseContext.handleFunctionDefinition(loc, functionDeclarator, attributes,
entryPointNode);
// compound_statement
TIntermNode* functionBody = nullptr;
if (! acceptCompoundStatement(functionBody))
return false;
parseContext.handleFunctionBody(loc, functionDeclarator, functionBody, node);
// this does a popScope()
parseContext.handleFunctionBody(loc, functionDeclarator, functionBody, functionNode);
// Hook up the 1 or 2 function definitions.
nodeList = intermediate.growAggregate(nodeList, functionNode);
nodeList = intermediate.growAggregate(nodeList, entryPointNode);
return true;
}
@@ -2472,17 +2554,22 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node)
// | function_call
// | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET
// | postfix_expression DOT IDENTIFIER
// | postfix_expression DOT IDENTIFIER arguments
// | postfix_expression COLONCOLON IDENTIFIER arguments
// | postfix_expression INC_OP
// | postfix_expression DEC_OP
//
bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
{
// Not implemented as self-recursive:
// The logical "right recursion" is done with an loop at the end
// The logical "right recursion" is done with a loop at the end
// idToken will pick up either a variable or a function name in a function call
HlslToken idToken;
// scopeBase will pick up the type symbol on the left of '::'
TSymbol* scopeBase = nullptr;
// Find something before the postfix operations, as they can't operate
// on nothing. So, no "return true", they fall through, only "return false".
if (acceptTokenClass(EHTokLeftParen)) {
@@ -2500,8 +2587,15 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
} else if (acceptConstructor(node)) {
// constructor (nothing else to do yet)
} else if (acceptIdentifier(idToken)) {
// identifier or function_call name
if (! peekTokenClass(EHTokLeftParen)) {
// user-type, identifier, or function name
if (peekTokenClass(EHTokColonColon)) {
TType type;
scopeBase = parseContext.lookupUserType(*idToken.string, type);
if (scopeBase == nullptr) {
expected("type left of ::");
return false;
}
} else if (! peekTokenClass(EHTokLeftParen)) {
node = parseContext.handleVariable(idToken.loc, idToken.symbol, idToken.string);
} else if (acceptFunctionCall(idToken, node)) {
// function_call (nothing else to do yet)
@@ -2521,7 +2615,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
~tFinalize() { parseContext.finalizeFlattening(); }
HlslParseContext& parseContext;
private:
const tFinalize& operator=(const tFinalize& f) { return *this; }
const tFinalize& operator=(const tFinalize&) { return *this; }
tFinalize(const tFinalize& f) : parseContext(f.parseContext) { }
} finalize(parseContext);
@@ -2542,6 +2636,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
case EOpIndexIndirect:
case EOpPostIncrement:
case EOpPostDecrement:
case EOpScoping:
advanceToken();
break;
default:
@@ -2550,26 +2645,28 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
// We have a valid post-unary operator, process it.
switch (postOp) {
case EOpScoping:
case EOpIndexDirectStruct:
{
// DOT IDENTIFIER
// includes swizzles and struct members
// includes swizzles, member variables, and member functions
HlslToken field;
if (! acceptIdentifier(field)) {
expected("swizzle or member");
return false;
}
TIntermTyped* base = node; // preserve for method function calls
node = parseContext.handleDotDereference(field.loc, node, *field.string);
if (peekTokenClass(EHTokLeftParen)) {
// member function
TIntermTyped* thisNode = node;
// In the event of a method node, we look for an open paren and accept the function call.
if (node != nullptr && node->getAsMethodNode() != nullptr && peekTokenClass(EHTokLeftParen)) {
if (! acceptFunctionCall(field, node, base)) {
// arguments
if (! acceptFunctionCall(field, node, thisNode, scopeBase)) {
expected("function parameters");
return false;
}
}
} else
node = parseContext.handleDotDereference(field.loc, node, *field.string);
break;
}
@@ -2636,20 +2733,39 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node)
// function_call
// : [idToken] arguments
//
bool HlslGrammar::acceptFunctionCall(HlslToken idToken, TIntermTyped*& node, TIntermTyped* base)
bool HlslGrammar::acceptFunctionCall(HlslToken callToken, TIntermTyped*& node, TIntermTyped* baseObject,
const TSymbol* baseType)
{
// name
TString* functionName = nullptr;
if ((baseObject == nullptr && baseType == nullptr)
|| parseContext.isBuiltInMethod(callToken.loc, baseObject, *callToken.string))
functionName = callToken.string;
else {
functionName = NewPoolTString("");
if (baseObject != nullptr) {
functionName->append(baseObject->getType().getTypeName().c_str());
functionName->append(".");
} else if (baseType != nullptr) {
functionName->append(baseType->getType().getTypeName());
functionName->append("::");
}
functionName->append(*callToken.string);
}
// function
TFunction* function = new TFunction(functionName, TType(EbtVoid));
// arguments
TFunction* function = new TFunction(idToken.string, TType(EbtVoid));
// Non-static member functions have an implicit first argument of the base object.
TIntermTyped* arguments = nullptr;
// methods have an implicit first argument of the calling object.
if (base != nullptr)
parseContext.handleFunctionArgument(function, arguments, base);
if (baseObject != nullptr)
parseContext.handleFunctionArgument(function, arguments, baseObject);
if (! acceptArguments(function, arguments))
return false;
node = parseContext.handleFunctionCall(idToken.loc, function, arguments);
// call
node = parseContext.handleFunctionCall(callToken.loc, function, arguments);
return true;
}
@@ -3258,7 +3374,7 @@ void HlslGrammar::acceptArraySpecifier(TArraySizes*& arraySizes)
TSourceLoc loc = token.loc;
TIntermTyped* sizeExpr = nullptr;
// Array sizing expression is optional. If ommitted, array will be later sized by initializer list.
// Array sizing expression is optional. If omitted, array will be later sized by initializer list.
const bool hasArraySize = acceptAssignmentExpression(sizeExpr);
if (! acceptTokenClass(EHTokRightBracket)) {
@@ -3377,7 +3493,7 @@ bool HlslGrammar::acceptPostDecls(TQualifier& qualifier)
parseContext.handleRegister(registerDesc.loc, qualifier, profile.string, *registerDesc.string, subComponent, spaceDesc.string);
} else {
// semantic, in idToken.string
parseContext.handleSemantic(idToken.loc, qualifier, *idToken.string);
parseContext.handleSemantic(idToken.loc, qualifier, mapSemantic(*idToken.string));
}
} else if (peekTokenClass(EHTokLeftAngle)) {
found = true;

View File

@@ -65,14 +65,15 @@ namespace glslang {
bool acceptIdentifier(HlslToken&);
bool acceptCompilationUnit();
bool acceptDeclaration(TIntermNode*&);
bool acceptDeclaration(TIntermNode*& node1, TIntermNode*& node2);
bool acceptControlDeclaration(TIntermNode*& node);
bool acceptSamplerDeclarationDX9(TType&);
bool acceptSamplerState();
bool acceptFullySpecifiedType(TType&);
bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList);
bool acceptQualifier(TQualifier&);
bool acceptLayoutQualifierList(TQualifier&);
bool acceptType(TType&);
bool acceptType(TType&, TIntermNode*& nodeList);
bool acceptTemplateVecMatBasicType(TBasicType&);
bool acceptVectorTemplateType(TType&);
bool acceptMatrixTemplateType(TType&);
@@ -84,11 +85,13 @@ namespace glslang {
bool acceptSamplerType(TType&);
bool acceptTextureType(TType&);
bool acceptStructBufferType(TType&);
bool acceptStruct(TType&);
bool acceptStructDeclarationList(TTypeList*&);
bool acceptStruct(TType&, TIntermNode*& nodeList);
bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, const TString& typeName);
bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TString& typeName,
const TType&, const TString& memberName);
bool acceptFunctionParameters(TFunction&);
bool acceptParameterDeclaration(TFunction&);
bool acceptFunctionDefinition(TFunction&, TIntermNode*& node1, TIntermNode*& node2, const TAttributeMap&);
bool acceptFunctionDefinition(TFunction&, TIntermNode*& nodeList, const TAttributeMap&);
bool acceptParenExpression(TIntermTyped*&);
bool acceptExpression(TIntermTyped*&);
bool acceptInitializer(TIntermTyped*&);
@@ -98,7 +101,8 @@ namespace glslang {
bool acceptUnaryExpression(TIntermTyped*&);
bool acceptPostfixExpression(TIntermTyped*&);
bool acceptConstructor(TIntermTyped*&);
bool acceptFunctionCall(HlslToken, TIntermTyped*&, TIntermTyped* base = nullptr);
bool acceptFunctionCall(HlslToken, TIntermTyped*&, TIntermTyped* objectBase = nullptr,
const TSymbol* typeBase = nullptr);
bool acceptArguments(TFunction*, TIntermTyped*&);
bool acceptLiteral(TIntermTyped*&);
bool acceptCompoundStatement(TIntermNode*&);

View File

@@ -118,6 +118,8 @@ TOperator HlslOpMap::postUnary(EHlslTokenClass op)
case EHTokIncOp: return EOpPostIncrement;
case EHTokDecOp: return EOpPostDecrement;
case EHTokColonColon: return EOpScoping;
default: return EOpNull; // means not a post-unary op
}
}

View File

@@ -805,36 +805,6 @@ TIntermTyped* HlslParseContext::handleUnaryMath(const TSourceLoc& loc, const cha
return childNode;
}
//
// Return true if the name is a sampler method
//
bool HlslParseContext::isSamplerMethod(const TString& name) const
{
return
name == "CalculateLevelOfDetail" ||
name == "CalculateLevelOfDetailUnclamped" ||
name == "Gather" ||
name == "GatherRed" ||
name == "GatherGreen" ||
name == "GatherBlue" ||
name == "GatherAlpha" ||
name == "GatherCmp" ||
name == "GatherCmpRed" ||
name == "GatherCmpGreen" ||
name == "GatherCmpBlue" ||
name == "GatherCmpAlpha" ||
name == "GetDimensions" ||
name == "GetSamplePosition" ||
name == "Load" ||
name == "Sample" ||
name == "SampleBias" ||
name == "SampleCmp" ||
name == "SampleCmpLevelZero" ||
name == "SampleGrad" ||
name == "SampleLevel";
}
//
// Return true if the name is a struct buffer method
//
@@ -862,47 +832,18 @@ bool HlslParseContext::isStructBufferMethod(const TString& name) const
}
//
// Handle seeing a base.field dereference in the grammar.
// Handle seeing a base.field dereference in the grammar, where 'field' is a
// swizzle or member variable.
//
TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TIntermTyped* base, const TString& field)
{
variableCheck(base);
//
// methods can't be resolved until we later see the function-calling syntax.
// Save away the name in the AST for now. Processing is completed in
// handleLengthMethod(), etc.
//
if (field == "length") {
return intermediate.addMethod(base, TType(EbtInt), &field, loc);
} else if (isSamplerMethod(field) && base->getType().getBasicType() == EbtSampler) {
// If it's not a method on a sampler object, we fall through to let other objects have a go.
const TSampler& sampler = base->getType().getSampler();
if (! sampler.isPureSampler()) {
const int vecSize = sampler.isShadow() ? 1 : 4; // TODO: handle arbitrary sample return sizes
return intermediate.addMethod(base, TType(sampler.type, EvqTemporary, vecSize), &field, loc);
}
} else if (isStructBufferType(base->getType())) {
TType retType(base->getType(), 0);
return intermediate.addMethod(base, retType, &field, loc);
} else if (field == "Append" ||
field == "RestartStrip") {
// We cannot check the type here: it may be sanitized if we're not compiling a geometry shader, but
// the code is around in the shader source.
return intermediate.addMethod(base, TType(EbtVoid), &field, loc);
}
// It's not .length() if we get to here.
if (base->isArray()) {
error(loc, "cannot apply to an array:", ".", field.c_str());
return base;
}
// It's neither an array nor .length() if we get here,
// leaving swizzles and struct/block dereferences.
TIntermTyped* result = base;
if (base->isVector() || base->isScalar()) {
TSwizzleSelectors<TVectorSelector> selectors;
@@ -1011,6 +952,30 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt
return result;
}
//
// Return true if the field should be treated as a built-in method.
// Return false otherwise.
//
bool HlslParseContext::isBuiltInMethod(const TSourceLoc& loc, TIntermTyped* base, const TString& field)
{
if (base == nullptr)
return false;
variableCheck(base);
if (base->getType().getBasicType() == EbtSampler) {
return true;
} else if (isStructBufferType(base->getType()) && isStructBufferMethod(field)) {
return true;
} else if (field == "Append" ||
field == "RestartStrip") {
// We cannot check the type here: it may be sanitized if we're not compiling a geometry shader, but
// the code is around in the shader source.
return true;
} else
return false;
}
// Split the type of the given node into two structs:
// 1. interstage IO
// 2. everything else
@@ -1439,12 +1404,7 @@ void HlslParseContext::assignLocations(TVariable& variable)
assignLocation(**member);
} else if (wasSplit(variable.getUniqueId())) {
TVariable* splitIoVar = getSplitIoVar(&variable);
const TTypeList* structure = splitIoVar->getType().getStruct();
// Struct splitting can produce empty structures if the only members of the
// struct were builtin interstage IO types. Only assign locations if it
// isn't a struct, or is a non-empty struct.
if (structure == nullptr || !structure->empty())
assignLocation(*splitIoVar);
assignLocation(*splitIoVar);
} else {
assignLocation(variable);
}
@@ -1521,6 +1481,8 @@ void HlslParseContext::addInterstageIoToLinkage()
// Handle seeing the function prototype in front of a function definition in the grammar.
// The body is handled after this function returns.
//
// Returns an aggregate of parameter-symbol nodes.
//
TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function,
const TAttributeMap& attributes, TIntermNode*& entryPointTree)
{
@@ -1885,7 +1847,7 @@ void HlslParseContext::remapEntryPointIO(TFunction& function, TVariable*& return
{
// Do the actual work to make a type be a shader input or output variable,
// and clear the original to be non-IO (for use as a normal function parameter/return).
const auto makeIoVariable = [this](const char* name, TType& type, TStorageQualifier storage) {
const auto makeIoVariable = [this](const char* name, TType& type, TStorageQualifier storage) -> TVariable* {
TVariable* ioVariable = makeInternalVariable(name, type);
clearUniformInputOutput(type.getQualifier());
if (type.getStruct() != nullptr) {
@@ -2071,7 +2033,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
if (split && derefType.isBuiltInInterstageIO(language)) {
// copy from interstage IO builtin if needed
subTree = intermediate.addSymbol(*interstageBuiltInIo.find(tInterstageIoData(derefType, outer->getType()))->second);
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.
if (subTree->getType().isArray() && !arrayElement.empty()) {
@@ -2701,6 +2663,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
const TSampler& sampler = texType.getSampler();
const TSamplerDim dim = sampler.dim;
const bool isImage = sampler.isImage();
const bool isMs = sampler.isMultiSample();
const int numArgs = (int)argAggregate->getSequence().size();
int numDims = 0;
@@ -2711,6 +2674,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
case Esd3D: numDims = 3; break; // W, H, D
case EsdCube: numDims = 2; break; // W, H (cube)
case EsdBuffer: numDims = 1; break; // W (buffers)
case EsdRect: numDims = 2; break; // W, H (rect)
default:
assert(0 && "unhandled texture dimension");
}
@@ -2719,17 +2683,31 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
if (sampler.isArrayed())
++numDims;
// Establish whether we're querying mip levels
const bool mipQuery = (numArgs > (numDims + 1)) && (!sampler.isMultiSample());
// Establish whether the method itself is querying mip levels. This can be false even
// if the underlying query requires a MIP level, due to the available HLSL method overloads.
const bool mipQuery = (numArgs > (numDims + 1 + (isMs ? 1 : 0)));
// Establish whether we must use the LOD form of query (even if the method did not supply a mip level to query).
// True if:
// 1. 1D/2D/3D/Cube AND multisample==0 AND NOT image (those can be sent to the non-LOD query)
// or,
// 2. There is a LOD (because the non-LOD query cannot be used in that case, per spec)
const bool mipRequired =
((dim == Esd1D || dim == Esd2D || dim == Esd3D || dim == EsdCube) && !isMs && !isImage) || // 1...
mipQuery; // 2...
// AST assumes integer return. Will be converted to float if required.
TIntermAggregate* sizeQuery = new TIntermAggregate(isImage ? EOpImageQuerySize : EOpTextureQuerySize);
sizeQuery->getSequence().push_back(argTex);
// If we're querying an explicit LOD, add the LOD, which is always arg #1
if (mipQuery) {
TIntermTyped* queryLod = argAggregate->getSequence()[1]->getAsTyped();
// If we're building an LOD query, add the LOD.
if (mipRequired) {
// If the base HLSL query had no MIP level given, use level 0.
TIntermTyped* queryLod = mipQuery ? argAggregate->getSequence()[1]->getAsTyped() :
intermediate.addConstantUnion(0, loc, true);
sizeQuery->getSequence().push_back(queryLod);
}
sizeQuery->setType(TType(EbtUint, EvqTemporary, numDims));
sizeQuery->setLoc(loc);
@@ -3020,8 +2998,10 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
// For now, we have nothing to map the component-wise comparison forms
// to, because neither GLSL nor SPIR-V has such an opcode. Issue an
// unimplemented error instead. Most of the machinery is here if that
// should ever become available.
if (cmpValues) {
// should ever become available. However, red can be passed through
// to OpImageDrefGather. G/B/A cannot, because that opcode does not
// accept a component.
if (cmpValues != 0 && op != EOpMethodGatherCmpRed) {
error(loc, "unimplemented: component-level gather compare", "", "");
return;
}
@@ -3102,7 +3082,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
}
// Add comparison value if we have one
if (argTex->getType().getSampler().isShadow())
if (argCmp != nullptr)
txgather->getSequence().push_back(argCmp);
// Add offset (either 1, or an array of 4) if we have one
@@ -3732,9 +3712,7 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct
TIntermTyped* result = nullptr;
TOperator op = function->getBuiltInOp();
if (op == EOpArrayLength)
result = handleLengthMethod(loc, function, arguments);
else if (op != EOpNull) {
if (op != EOpNull) {
//
// Then this should be a constructor.
// Don't go through the symbol table for constructors.
@@ -3848,41 +3826,6 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct
return result;
}
// Finish processing object.length(). This started earlier in handleDotDereference(), where
// the ".length" part was recognized and semantically checked, and finished here where the
// function syntax "()" is recognized.
//
// Return resulting tree node.
TIntermTyped* HlslParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction* function, TIntermNode* intermNode)
{
int length = 0;
if (function->getParamCount() > 0)
error(loc, "method does not accept any arguments", function->getName().c_str(), "");
else {
const TType& type = intermNode->getAsTyped()->getType();
if (type.isArray()) {
if (type.isRuntimeSizedArray()) {
// Create a unary op and let the back end handle it
return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt));
} else
length = type.getOuterArraySize();
} else if (type.isMatrix())
length = type.getMatrixCols();
else if (type.isVector())
length = type.getVectorSize();
else {
// we should not get here, because earlier semantic checking should have prevented this path
error(loc, ".length()", "unexpected use of .length()", "");
}
}
if (length == 0)
length = 1;
return intermediate.addConstantUnion(length, loc);
}
//
// Add any needed implicit conversions for function-call arguments to input parameters.
//
@@ -4206,118 +4149,23 @@ TFunction* HlslParseContext::handleConstructorCall(const TSourceLoc& loc, const
// Handle seeing a "COLON semantic" at the end of a type declaration,
// by updating the type according to the semantic.
//
void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, const TString& semantic)
void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, TBuiltInVariable builtIn)
{
// TODO: need to know if it's an input or an output
// The following sketches what needs to be done, but can't be right
// without taking into account stage and input/output.
// adjust for stage in/out
TString semanticUpperCase = semantic;
std::transform(semanticUpperCase.begin(), semanticUpperCase.end(), semanticUpperCase.begin(), ::toupper);
// in DX9, all outputs had to have a semantic associated with them, that was either consumed
// by the system or was a specific register assignment
// in DX10+, only semantics with the SV_ prefix have any meaning beyond decoration
// Fxc will only accept DX9 style semantics in compat mode
// Also, in DX10 if a SV value is present as the input of a stage, but isn't appropriate for that
// stage, it would just be ignored as it is likely there as part of an output struct from one stage
// to the next
bool bParseDX9 = false;
if (bParseDX9) {
if (semanticUpperCase == "PSIZE")
qualifier.builtIn = EbvPointSize;
else if (semantic == "FOG")
qualifier.builtIn = EbvFogFragCoord;
else if (semanticUpperCase == "DEPTH")
qualifier.builtIn = EbvFragDepth;
else if (semanticUpperCase == "VFACE")
qualifier.builtIn = EbvFace;
else if (semanticUpperCase == "VPOS")
qualifier.builtIn = EbvFragCoord;
switch(builtIn) {
case EbvPosition:
if (language == EShLangFragment)
builtIn = EbvFragCoord;
break;
case EbvStencilRef:
error(loc, "unimplemented; need ARB_shader_stencil_export", "SV_STENCILREF", "");
break;
default:
break;
}
// SV Position has a different meaning in vertex vs fragment
if (semanticUpperCase == "SV_POSITION" && language != EShLangFragment)
qualifier.builtIn = EbvPosition;
else if (semanticUpperCase == "SV_POSITION" && language == EShLangFragment)
qualifier.builtIn = EbvFragCoord;
else if (semanticUpperCase == "SV_CLIPDISTANCE")
qualifier.builtIn = EbvClipDistance;
else if (semanticUpperCase == "SV_CULLDISTANCE")
qualifier.builtIn = EbvCullDistance;
else if (semanticUpperCase == "SV_VERTEXID")
qualifier.builtIn = EbvVertexIndex;
else if (semanticUpperCase == "SV_VIEWPORTARRAYINDEX")
qualifier.builtIn = EbvViewportIndex;
else if (semanticUpperCase == "SV_TESSFACTOR")
qualifier.builtIn = EbvTessLevelOuter;
// Targets are defined 0-7
else if (semanticUpperCase == "SV_TARGET") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 0;
} else if (semanticUpperCase == "SV_TARGET0") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 0;
} else if (semanticUpperCase == "SV_TARGET1") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 1;
} else if (semanticUpperCase == "SV_TARGET2") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 2;
} else if (semanticUpperCase == "SV_TARGET3") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 3;
} else if (semanticUpperCase == "SV_TARGET4") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 4;
} else if (semanticUpperCase == "SV_TARGET5") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 5;
} else if (semanticUpperCase == "SV_TARGET6") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 6;
} else if (semanticUpperCase == "SV_TARGET7") {
qualifier.builtIn = EbvNone;
// qualifier.layoutLocation = 7;
} else if (semanticUpperCase == "SV_SAMPLEINDEX")
qualifier.builtIn = EbvSampleId;
else if (semanticUpperCase == "SV_RENDERTARGETARRAYINDEX")
qualifier.builtIn = EbvLayer;
else if (semanticUpperCase == "SV_PRIMITIVEID")
qualifier.builtIn = EbvPrimitiveId;
else if (semanticUpperCase == "SV_OUTPUTCONTROLPOINTID")
qualifier.builtIn = EbvInvocationId;
else if (semanticUpperCase == "SV_ISFRONTFACE")
qualifier.builtIn = EbvFace;
else if (semanticUpperCase == "SV_INSTANCEID")
qualifier.builtIn = EbvInstanceIndex;
else if (semanticUpperCase == "SV_INSIDETESSFACTOR")
qualifier.builtIn = EbvTessLevelInner;
else if (semanticUpperCase == "SV_GSINSTANCEID")
qualifier.builtIn = EbvInvocationId;
else if (semanticUpperCase == "SV_DISPATCHTHREADID")
qualifier.builtIn = EbvGlobalInvocationId;
else if (semanticUpperCase == "SV_GROUPTHREADID")
qualifier.builtIn = EbvLocalInvocationId;
else if (semanticUpperCase == "SV_GROUPINDEX")
qualifier.builtIn = EbvLocalInvocationIndex;
else if (semanticUpperCase == "SV_GROUPID")
qualifier.builtIn = EbvWorkGroupId;
else if (semanticUpperCase == "SV_DOMAINLOCATION")
qualifier.builtIn = EbvTessCoord;
else if (semanticUpperCase == "SV_DEPTH")
qualifier.builtIn = EbvFragDepth;
else if( semanticUpperCase == "SV_COVERAGE")
qualifier.builtIn = EbvSampleMask;
// TODO, these need to get refined to be more specific
else if( semanticUpperCase == "SV_DEPTHGREATEREQUAL")
qualifier.builtIn = EbvFragDepthGreater;
else if( semanticUpperCase == "SV_DEPTHLESSEQUAL")
qualifier.builtIn = EbvFragDepthLesser;
else if( semanticUpperCase == "SV_STENCILREF")
error(loc, "unimplemented; need ARB_shader_stencil_export", "SV_STENCILREF", "");
qualifier.builtIn = builtIn;
}
//
@@ -5223,10 +5071,6 @@ void HlslParseContext::shareStructBufferType(TType& type)
return compareQualifiers(lhs, rhs) && lhs == rhs;
};
// TString typeName;
// type.appendMangledName(typeName);
// type.setTypeName(typeName);
// This is an exhaustive O(N) search, but real world shaders have
// only a small number of these.
for (int idx = 0; idx < int(structBufferTypes.size()); ++idx) {
@@ -5241,8 +5085,6 @@ void HlslParseContext::shareStructBufferType(TType& type)
TType* typeCopy = new TType;
typeCopy->shallowCopy(type);
structBufferTypes.push_back(typeCopy);
// structBuffTypes.push_back(type.getWritableStruct());
}
void HlslParseContext::paramFix(TType& type)
@@ -7247,6 +7089,49 @@ TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* ex
return switchNode;
}
// Track levels of class/struct nesting with a prefix string using
// the type names separated by the scoping operator. E.g., two levels
// would look like:
//
// outer::inner
//
// The string is empty when at normal global level.
//
void HlslParseContext::pushThis(const TString& typeName)
{
// make new type prefix
TString newPrefix;
if (currentTypePrefix.size() > 0) {
newPrefix = currentTypePrefix.back();
newPrefix.append("::");
}
newPrefix.append(typeName);
currentTypePrefix.push_back(newPrefix);
}
// Opposite of pushThis(), see above
void HlslParseContext::popThis()
{
currentTypePrefix.pop_back();
}
// Use the class/struct nesting string to create a global name for
// a member of a class/struct. Static members use "::" for the final
// step, while non-static members use ".".
TString* HlslParseContext::getFullMemberFunctionName(const TString& memberName, bool isStatic) const
{
TString* name = NewPoolTString("");
if (currentTypePrefix.size() > 0)
name->append(currentTypePrefix.back());
if (isStatic)
name->append("::");
else
name->append(".");
name->append(memberName);
return name;
}
// Potentially rename shader entry point function
void HlslParseContext::renameShaderFunction(TString*& name) const
{
@@ -7493,9 +7378,9 @@ void HlslParseContext::addPatchConstantInvocation()
const TStorageQualifier storage = function[p].type->getQualifier().storage;
if (function[p].declaredBuiltIn != EbvNone)
builtIns.insert(tInterstageIoData(function[p].declaredBuiltIn, storage));
builtIns.insert(HlslParseContext::tInterstageIoData(function[p].declaredBuiltIn, storage));
else
builtIns.insert(tInterstageIoData(function[p].type->getQualifier().builtIn, storage));
builtIns.insert(HlslParseContext::tInterstageIoData(function[p].type->getQualifier().builtIn, storage));
}
};
@@ -7581,8 +7466,9 @@ void HlslParseContext::addPatchConstantInvocation()
notInEntryPoint = pcfBuiltIns;
for (auto bi : epfBuiltIns) // std::set_difference not usable on unordered containers
notInEntryPoint.erase(bi);
// std::set_difference not usable on unordered containers
for (auto bi = epfBuiltIns.begin(); bi != epfBuiltIns.end(); ++bi)
notInEntryPoint.erase(*bi);
// Now we'll add those to the entry and to the linkage.
for (int p=0; p<pcfParamCount; ++p) {

View File

@@ -70,6 +70,7 @@ public:
TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right);
TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode);
TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field);
bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field);
void assignLocations(TVariable& variable);
TFunction& handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree);
@@ -86,12 +87,11 @@ public:
void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
void decomposeGeometryMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*);
void addInputArgumentConversions(const TFunction&, TIntermTyped*&);
TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermOperator&);
void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
TFunction* handleConstructorCall(const TSourceLoc&, const TType&);
void handleSemantic(TSourceLoc, TQualifier&, const TString& semantic);
void handleSemantic(TSourceLoc, TQualifier&, TBuiltInVariable);
void handlePackOffset(const TSourceLoc&, TQualifier&, const glslang::TString& location,
const glslang::TString* component);
void handleRegister(const TSourceLoc&, TQualifier&, const glslang::TString* profile, const glslang::TString& desc,
@@ -160,6 +160,10 @@ public:
void pushScope() { symbolTable.push(); }
void popScope() { symbolTable.pop(0); }
void pushThis(const TString& name);
void popThis();
TString* getFullMemberFunctionName(const TString& name, bool isStatic) const;
void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); }
void popSwitchSequence() { switchSequenceStack.pop_back(); }
@@ -249,7 +253,6 @@ protected:
void clearUniformInputOutput(TQualifier& qualifier);
// Test method names
bool isSamplerMethod(const TString& name) const;
bool isStructBufferMethod(const TString& name) const;
TType* getStructBufferContentType(const TType& type) const;
@@ -383,6 +386,7 @@ protected:
TString patchConstantFunctionName; // hull shader patch constant function name, from function level attribute.
TMap<TBuiltInVariable, TSymbol*> builtInLinkageSymbols; // used for tessellation, finding declared builtins
TVector<TString> currentTypePrefix;
};
} // end namespace glslang

View File

@@ -47,7 +47,6 @@
#include "../glslang/MachineIndependent/ParseHelper.h"
#include "hlslScanContext.h"
#include "hlslTokens.h"
//#include "Scan.h"
// preprocessor includes
#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
@@ -82,6 +81,7 @@ struct str_hash
// After a single process-level initialization, this is read only and thread safe
std::unordered_map<const char*, glslang::EHlslTokenClass, str_hash, str_eq>* KeywordMap = nullptr;
std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
std::unordered_map<const char*, glslang::TBuiltInVariable, str_hash, str_eq>* SemanticMap = nullptr;
};
@@ -381,6 +381,73 @@ void HlslScanContext::fillInKeywordMap()
ReservedSet->insert("unsigned");
ReservedSet->insert("using");
ReservedSet->insert("virtual");
SemanticMap = new std::unordered_map<const char*, glslang::TBuiltInVariable, str_hash, str_eq>;
// in DX9, all outputs had to have a semantic associated with them, that was either consumed
// by the system or was a specific register assignment
// in DX10+, only semantics with the SV_ prefix have any meaning beyond decoration
// Fxc will only accept DX9 style semantics in compat mode
// Also, in DX10 if a SV value is present as the input of a stage, but isn't appropriate for that
// stage, it would just be ignored as it is likely there as part of an output struct from one stage
// to the next
bool bParseDX9 = false;
if (bParseDX9) {
(*SemanticMap)["PSIZE"] = EbvPointSize;
(*SemanticMap)["FOG"] = EbvFogFragCoord;
(*SemanticMap)["DEPTH"] = EbvFragDepth;
(*SemanticMap)["VFACE"] = EbvFace;
(*SemanticMap)["VPOS"] = EbvFragCoord;
}
(*SemanticMap)["SV_POSITION"] = EbvPosition;
(*SemanticMap)["SV_CLIPDISTANCE"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE0"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE1"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE2"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE3"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE4"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE5"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE6"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE7"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE8"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE9"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE10"] = EbvClipDistance;
(*SemanticMap)["SV_CLIPDISTANCE11"] = EbvClipDistance;
(*SemanticMap)["SV_CULLDISTANCE"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE0"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE1"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE2"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE3"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE4"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE5"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE6"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE7"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE8"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE9"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE10"] = EbvCullDistance;
(*SemanticMap)["SV_CULLDISTANCE11"] = EbvCullDistance;
(*SemanticMap)["SV_VERTEXID"] = EbvVertexIndex;
(*SemanticMap)["SV_VIEWPORTARRAYINDEX"] = EbvViewportIndex;
(*SemanticMap)["SV_TESSFACTOR"] = EbvTessLevelOuter;
(*SemanticMap)["SV_SAMPLEINDEX"] = EbvSampleId;
(*SemanticMap)["SV_RENDERTARGETARRAYINDEX"] = EbvLayer;
(*SemanticMap)["SV_PRIMITIVEID"] = EbvPrimitiveId;
(*SemanticMap)["SV_OUTPUTCONTROLPOINTID"] = EbvInvocationId;
(*SemanticMap)["SV_ISFRONTFACE"] = EbvFace;
(*SemanticMap)["SV_INSTANCEID"] = EbvInstanceIndex;
(*SemanticMap)["SV_INSIDETESSFACTOR"] = EbvTessLevelInner;
(*SemanticMap)["SV_GSINSTANCEID"] = EbvInvocationId;
(*SemanticMap)["SV_DISPATCHTHREADID"] = EbvGlobalInvocationId;
(*SemanticMap)["SV_GROUPTHREADID"] = EbvLocalInvocationId;
(*SemanticMap)["SV_GROUPINDEX"] = EbvLocalInvocationIndex;
(*SemanticMap)["SV_GROUPID"] = EbvWorkGroupId;
(*SemanticMap)["SV_DOMAINLOCATION"] = EbvTessCoord;
(*SemanticMap)["SV_DEPTH"] = EbvFragDepth;
(*SemanticMap)["SV_COVERAGE"] = EbvSampleMask;
(*SemanticMap)["SV_DEPTHGREATEREQUAL"] = EbvFragDepthGreater;
(*SemanticMap)["SV_DEPTHLESSEQUAL"] = EbvFragDepthLesser;
(*SemanticMap)["SV_STENCILREF"] = EbvStencilRef;
}
void HlslScanContext::deleteKeywordMap()
@@ -389,15 +456,29 @@ void HlslScanContext::deleteKeywordMap()
KeywordMap = nullptr;
delete ReservedSet;
ReservedSet = nullptr;
delete SemanticMap;
SemanticMap = nullptr;
}
// Wrapper for tokenizeClass()"] = to get everything inside the token.
// Wrapper for tokenizeClass() to get everything inside the token.
void HlslScanContext::tokenize(HlslToken& token)
{
EHlslTokenClass tokenClass = tokenizeClass(token);
token.tokenClass = tokenClass;
}
glslang::TBuiltInVariable HlslScanContext::mapSemantic(const TString& semantic)
{
TString semanticUpperCase = semantic;
std::transform(semanticUpperCase.begin(), semanticUpperCase.end(), semanticUpperCase.begin(), ::toupper);
auto it = SemanticMap->find(semanticUpperCase.c_str());
if (it != SemanticMap->end())
return it->second;
else
return glslang::EbvNone;
}
//
// Fill in token information for the next token, except for the token class.
// Returns the enum value of the token class of the next token found.
@@ -471,6 +552,8 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token)
case PpAtomDecrement: return EHTokDecOp;
case PpAtomIncrement: return EHTokIncOp;
case PpAtomColonColon: return EHTokColonColon;
case PpAtomConstInt: parserToken->i = ppToken.ival; return EHTokIntConstant;
case PpAtomConstUint: parserToken->i = ppToken.ival; return EHTokUintConstant;
case PpAtomConstFloat: parserToken->d = ppToken.dval; return EHTokFloatConstant;

View File

@@ -82,6 +82,7 @@ public:
static void deleteKeywordMap();
void tokenize(HlslToken&);
glslang::TBuiltInVariable mapSemantic(const TString& semantic);
protected:
HlslScanContext(HlslScanContext&);

View File

@@ -52,6 +52,7 @@ namespace glslang {
bool acceptTokenClass(EHlslTokenClass);
EHlslTokenClass peek() const;
bool peekTokenClass(EHlslTokenClass) const;
glslang::TBuiltInVariable mapSemantic(const TString& semantic) { return scanner.mapSemantic(semantic); }
protected:
HlslToken token; // the token we are currently looking at, but have not yet accepted

View File

@@ -267,7 +267,6 @@ enum EHlslTokenClass {
// variable, user type, ...
EHTokIdentifier,
EHTokTypeName,
EHTokClass,
EHTokStruct,
EHTokCBuffer,
@@ -328,6 +327,7 @@ enum EHlslTokenClass {
EHTokDot,
EHTokComma,
EHTokColon,
EHTokColonColon,
EHTokSemicolon,
EHTokBang,
EHTokDash,