Debian Codegraph @

third_party/spirv-cross/shaders/asm/frag/composite-construct-struct-no-swizzle.asm.frag

raw
1 ; SPIR-V
2 ; Version: 1.0
3 ; Generator: Khronos Glslang Reference Front End; 3
4 ; Bound: 39
5 ; Schema: 0
6 OpCapability Shader
7 %1 = OpExtInstImport "GLSL.std.450"
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint Fragment %main "main" %foo %FooOut
10 OpExecutionMode %main OriginUpperLeft
11 OpSource ESSL 310
12 OpName %main "main"
13 OpName %foo "foo"
14 OpName %SwizzleTest "SwizzleTest"
15 OpMemberName %SwizzleTest 0 "a"
16 OpMemberName %SwizzleTest 1 "b"
17 OpName %FooOut "FooOut"
18 OpDecorate %foo RelaxedPrecision
19 OpDecorate %foo Location 0
20 OpDecorate %12 RelaxedPrecision
21 OpMemberDecorate %SwizzleTest 0 RelaxedPrecision
22 OpMemberDecorate %SwizzleTest 1 RelaxedPrecision
23 OpDecorate %FooOut RelaxedPrecision
24 OpDecorate %FooOut Location 0
25 OpDecorate %34 RelaxedPrecision
26 %void = OpTypeVoid
27 %3 = OpTypeFunction %void
28 %float = OpTypeFloat 32
29 %v2float = OpTypeVector %float 2
30 %_ptr_Function_v2float = OpTypePointer Function %v2float
31 %_ptr_Input_v2float = OpTypePointer Input %v2float
32 %foo = OpVariable %_ptr_Input_v2float Input
33 %SwizzleTest = OpTypeStruct %float %float
34 %_ptr_Function_SwizzleTest = OpTypePointer Function %SwizzleTest
35 %uint = OpTypeInt 32 0
36 %_ptr_Function_float = OpTypePointer Function %float
37 %_ptr_Output_float = OpTypePointer Output %float
38 %FooOut = OpVariable %_ptr_Output_float Output
39 %int = OpTypeInt 32 1
40 %main = OpFunction %void None %3
41 %5 = OpLabel
42 %12 = OpLoad %v2float %foo
43 %36 = OpCompositeExtract %float %12 0
44 %38 = OpCompositeExtract %float %12 1
45 %test0 = OpCompositeConstruct %SwizzleTest %36 %38
46 %new0 = OpCompositeExtract %float %test0 0
47 %new1 = OpCompositeExtract %float %test0 1
48 %34 = OpFAdd %float %new0 %new1
49 OpStore %FooOut %34
50 OpReturn
51 OpFunctionEnd