Debian Codegraph @

third_party/spirv-cross/shaders/asm/frag/pack-and-unpack-uint2.asm.frag

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 7
4 ; Bound: 34
5 ; Schema: 0
6 OpCapability Shader
7 OpCapability Int64
8 %1 = OpExtInstImport "GLSL.std.450"
9 OpMemoryModel Logical GLSL450
10 OpEntryPoint Fragment %main "main" %FragColor
11 OpExecutionMode %main OriginUpperLeft
12 OpSource GLSL 450
13 OpSourceExtension "GL_ARB_gpu_shader_int64"
14 OpName %main "main"
15 OpName %packed "packed"
16 OpName %unpacked "unpacked"
17 OpName %FragColor "FragColor"
18 OpDecorate %FragColor Location 0
19 %void = OpTypeVoid
20 %3 = OpTypeFunction %void
21 %ulong = OpTypeInt 64 0
22 %_ptr_Function_ulong = OpTypePointer Function %ulong
23 %uint = OpTypeInt 32 0
24 %v2uint = OpTypeVector %uint 2
25 %uint_18 = OpConstant %uint 18
26 %uint_52 = OpConstant %uint 52
27 %13 = OpConstantComposite %v2uint %uint_18 %uint_52
28 %_ptr_Function_v2uint = OpTypePointer Function %v2uint
29 %float = OpTypeFloat 32
30 %v4float = OpTypeVector %float 4
31 %_ptr_Output_v4float = OpTypePointer Output %v4float
32 %FragColor = OpVariable %_ptr_Output_v4float Output
33 %uint_0 = OpConstant %uint 0
34 %_ptr_Function_uint = OpTypePointer Function %uint
35 %uint_1 = OpConstant %uint 1
36 %float_1 = OpConstant %float 1
37 %main = OpFunction %void None %3
38 %5 = OpLabel
39 %packed = OpVariable %_ptr_Function_ulong Function
40 %unpacked = OpVariable %_ptr_Function_v2uint Function
41 %14 = OpBitcast %ulong %13
42 OpStore %packed %14
43 %17 = OpLoad %ulong %packed
44 %18 = OpBitcast %v2uint %17
45 OpStore %unpacked %18
46 %25 = OpAccessChain %_ptr_Function_uint %unpacked %uint_0
47 %26 = OpLoad %uint %25
48 %27 = OpConvertUToF %float %26
49 %29 = OpAccessChain %_ptr_Function_uint %unpacked %uint_1
50 %30 = OpLoad %uint %29
51 %31 = OpConvertUToF %float %30
52 %33 = OpCompositeConstruct %v4float %27 %31 %float_1 %float_1
53 OpStore %FragColor %33
54 OpReturn
55 OpFunctionEnd