yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

Wint3rNightDon't emit OpUConvert for spec constants before SPIR-V 1.42d0f1968

main
5.4 KiB111 linesraw
1spv.specConstantOp.uconvert.comp
2// Module Version 10000
3// Generated by (magic number): 8000b
4// Id's are bound by 61
5
6                              Capability Shader
7                              Capability Int64
8                              Capability Int16
9                              Capability Int8
10               1:             ExtInstImport  "GLSL.std.450"
11                              MemoryModel Logical GLSL450
12                              EntryPoint GLCompute 4  "main"
13                              ExecutionMode 4 LocalSize 1 1 1
14                              Source GLSL 450
15                              SourceExtension  "GL_EXT_shader_explicit_arithmetic_types_int16"
16                              SourceExtension  "GL_EXT_shader_explicit_arithmetic_types_int64"
17                              SourceExtension  "GL_EXT_shader_explicit_arithmetic_types_int8"
18                              Name 4  "main"
19                              Name 9  "S"
20                              MemberName 9(S) 0  "p_out"
21                              Name 11  ""
22                              Name 14  "su"
23                              Name 16  "u_to_u16"
24                              Name 26  "u_to_u64"
25                              Name 30  "su16"
26                              Name 32  "u16_to_u"
27                              Name 35  "su64"
28                              Name 36  "u64_to_u"
29                              Name 39  "si"
30                              Name 43  "i_to_u16"
31                              Name 51  "i_to_u64"
32                              Name 56  "su8"
33                              Name 59  "u8_to_u"
34                              Decorate 8 ArrayStride 4
35                              Decorate 9(S) BufferBlock
36                              MemberDecorate 9(S) 0 Offset 0
37                              Decorate 11 Binding 0
38                              Decorate 11 DescriptorSet 0
39                              Decorate 14(su) SpecId 0
40                              Decorate 30(su16) SpecId 1
41                              Decorate 35(su64) SpecId 2
42                              Decorate 39(si) SpecId 3
43                              Decorate 56(su8) SpecId 4
44               2:             TypeVoid
45               3:             TypeFunction 2
46               6:             TypeInt 32 0
47               7:      6(int) Constant 7
48               8:             TypeArray 6(int) 7
49            9(S):             TypeStruct 8
50              10:             TypePointer Uniform 9(S)
51              11:     10(ptr) Variable Uniform
52              12:             TypeInt 32 1
53              13:     12(int) Constant 0
54          14(su):      6(int) SpecConstant 2147483649
55              15:             TypeInt 16 0
56    16(u_to_u16): 15(int16_t) SpecConstantOp 114 14(su)
57              17:      6(int) SpecConstantOp 114 16(u_to_u16)
58              18:      6(int) Constant 65535
59              19:      6(int) SpecConstantOp 199 17 18
60              20:             TypePointer Uniform 6(int)
61              22:     12(int) Constant 1
62              23:             TypeInt 64 0
63              24: 23(int64_t) SpecConstantOp 114 14(su)
64              25: 23(int64_t) Constant 4294967295 0
65    26(u_to_u64): 23(int64_t) SpecConstantOp 199 24 25
66              27:      6(int) SpecConstantOp 114 26(u_to_u64)
67              29:     12(int) Constant 2
68        30(su16): 15(int16_t) SpecConstant 32769
69              31:      6(int) SpecConstantOp 114 30(su16)
70    32(u16_to_u):      6(int) SpecConstantOp 199 31 18
71              34:     12(int) Constant 3
72        35(su64): 23(int64_t) SpecConstant 1 2147483648
73    36(u64_to_u):      6(int) SpecConstantOp 114 35(su64)
74              38:     12(int) Constant 4
75          39(si):     12(int) SpecConstant 4294967294
76              40:             TypeInt 16 1
77              41: 40(int16_t) SpecConstantOp 114 39(si)
78              42: 15(int16_t) Constant 0
79    43(i_to_u16): 15(int16_t) SpecConstantOp 128 41 42
80              44:      6(int) SpecConstantOp 114 43(i_to_u16)
81              45:      6(int) SpecConstantOp 199 44 18
82              47:     12(int) Constant 5
83              48:             TypeInt 64 1
84              49: 48(int64_t) SpecConstantOp 114 39(si)
85              50: 23(int64_t) Constant 0 0
86    51(i_to_u64): 23(int64_t) SpecConstantOp 128 49 50
87              52:      6(int) SpecConstantOp 114 51(i_to_u64)
88              54:     12(int) Constant 6
89              55:             TypeInt 8 0
90         56(su8):  55(int8_t) SpecConstant 129
91              57:      6(int) SpecConstantOp 114 56(su8)
92              58:      6(int) Constant 255
93     59(u8_to_u):      6(int) SpecConstantOp 199 57 58
94         4(main):           2 Function None 3
95               5:             Label
96              21:     20(ptr) AccessChain 11 13 13
97                              Store 21 19
98              28:     20(ptr) AccessChain 11 13 22
99                              Store 28 27
100              33:     20(ptr) AccessChain 11 13 29
101                              Store 33 32(u16_to_u)
102              37:     20(ptr) AccessChain 11 13 34
103                              Store 37 36(u64_to_u)
104              46:     20(ptr) AccessChain 11 13 38
105                              Store 46 45
106              53:     20(ptr) AccessChain 11 13 47
107                              Store 53 52
108              60:     20(ptr) AccessChain 11 13 54
109                              Store 60 59(u8_to_u)
110                              Return
111                              FunctionEnd