glslang-zig/Test/baseResults/hlsl.matType.frag.out
Steven Perron 33c7e30860
Don't emit duplicate decorations. (#3635)
It is invalid if the same decoration is applied to the same id multiple
times. This adds a check before adding a decoration that the decoration
is not already in the list. If it is, then the duplicate is not added.

Fixes #3627
2024-06-28 19:16:59 -04:00

105 lines
5.3 KiB
Text

hlsl.matType.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: ShaderFunction(vf1;f1; ( temp 1-component vector of float)
0:9 Function Parameters:
0:9 'inFloat1' ( in 1-component vector of float)
0:9 'inScalar' ( in float)
0:? Sequence
0:10 Branch: Return with expression
0:10 'inFloat1' ( in 1-component vector of float)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 1-component vector of float f1, uniform 1X1 matrix of float fmat11, uniform 4X1 matrix of float fmat41, uniform 1X2 matrix of float fmat12, uniform 2X3 matrix of double dmat23, uniform 4X4 matrix of int int44})
Linked fragment stage:
WARNING: Linking fragment stage: Entry point not found
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: ShaderFunction(vf1;f1; ( temp 1-component vector of float)
0:9 Function Parameters:
0:9 'inFloat1' ( in 1-component vector of float)
0:9 'inScalar' ( in float)
0:? Sequence
0:10 Branch: Return with expression
0:10 'inFloat1' ( in 1-component vector of float)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 1-component vector of float f1, uniform 1X1 matrix of float fmat11, uniform 4X1 matrix of float fmat41, uniform 1X2 matrix of float fmat12, uniform 2X3 matrix of double dmat23, uniform 4X4 matrix of int int44})
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 30
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction"
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "PixelShaderFunction"
Name 11 "ShaderFunction(vf1;f1;"
Name 9 "inFloat1"
Name 10 "inScalar"
Name 27 "$Global"
MemberName 27($Global) 0 "f1"
MemberName 27($Global) 1 "fmat11"
MemberName 27($Global) 2 "fmat41"
MemberName 27($Global) 3 "fmat12"
MemberName 27($Global) 4 "dmat23"
MemberName 27($Global) 5 "int44"
Name 29 ""
Decorate 27($Global) Block
MemberDecorate 27($Global) 0 Offset 0
MemberDecorate 27($Global) 1 RowMajor
MemberDecorate 27($Global) 1 MatrixStride 16
MemberDecorate 27($Global) 1 Offset 16
MemberDecorate 27($Global) 2 RowMajor
MemberDecorate 27($Global) 2 MatrixStride 16
MemberDecorate 27($Global) 2 Offset 32
MemberDecorate 27($Global) 3 RowMajor
MemberDecorate 27($Global) 3 MatrixStride 16
MemberDecorate 27($Global) 3 Offset 48
MemberDecorate 27($Global) 4 RowMajor
MemberDecorate 27($Global) 4 MatrixStride 16
MemberDecorate 27($Global) 4 Offset 80
MemberDecorate 27($Global) 5 RowMajor
MemberDecorate 27($Global) 5 MatrixStride 16
MemberDecorate 27($Global) 5 Offset 128
Decorate 29 Binding 0
Decorate 29 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
8: TypeFunction 6(float) 7(ptr) 7(ptr)
16: TypeVector 6(float) 1
17: TypeMatrix 16(fvec) 1
18: TypeMatrix 16(fvec) 4
19: TypeVector 6(float) 2
20: TypeMatrix 19(fvec2) 1
21: TypeFloat 64
22: TypeVector 21(float64_t) 3
23: TypeMatrix 22(f64vec3) 2
24: TypeInt 32 1
25: TypeVector 24(int) 4
26: TypeMatrix 25(ivec4) 4
27($Global): TypeStruct 6(float) 17 18 20 23 26
28: TypePointer Uniform 27($Global)
29: 28(ptr) Variable Uniform
4(PixelShaderFunction): 2 Function None 3
5: Label
Return
FunctionEnd
11(ShaderFunction(vf1;f1;): 6(float) Function None 8
9(inFloat1): 7(ptr) FunctionParameter
10(inScalar): 7(ptr) FunctionParameter
12: Label
13: 6(float) Load 9(inFloat1)
ReturnValue 13
FunctionEnd