RetroArch/deps/SPIRV-Cross/shaders/asm/comp/switch-break-ladder.asm.comp
twinaphex 420b7913d4 Squashed 'deps/SPIRV-Cross/' changes from 8aa6731925..2820ab0b51
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl
63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330.
9f3bebe3d0 Merge pull request #1075 from lifpan/master
b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter.
1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout
28454facbb MSL: Handle packed matrices.
ea5c0ed82f MSL: Fix alignment of packed types.
44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066
25c74b324e Forget loop variable enables after emitting block chain.
6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053
f6f849397e MSL: Re-roll array expressions in initializers.
e5fa7edfd6 MSL: Support scalar block layout.

git-subtree-dir: deps/SPIRV-Cross
git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
2019-07-11 20:37:45 +02:00

93 lines
3.0 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 6
; Bound: 50
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpSource GLSL 450
OpName %main "main"
OpName %c "c"
OpName %BUF "BUF"
OpMemberName %BUF 0 "a"
OpMemberName %BUF 1 "b"
OpMemberName %BUF 2 "d"
OpName %o "o"
OpName %a "a"
OpMemberDecorate %BUF 0 Offset 0
OpMemberDecorate %BUF 1 Offset 4
OpMemberDecorate %BUF 2 Offset 8
OpDecorate %BUF BufferBlock
OpDecorate %o DescriptorSet 0
OpDecorate %o Binding 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%BUF = OpTypeStruct %int %int %int
%_ptr_Uniform_BUF = OpTypePointer Uniform %BUF
%o = OpVariable %_ptr_Uniform_BUF Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%main = OpFunction %void None %3
%5 = OpLabel
%c = OpVariable %_ptr_Function_int Function
%a = OpVariable %_ptr_Function_int Function
%14 = OpAccessChain %_ptr_Uniform_int %o %int_0
%15 = OpLoad %int %14
OpStore %c %15
OpBranch %16
%16 = OpLabel
OpLoopMerge %18 %19 None
OpBranch %17
%17 = OpLabel
%20 = OpLoad %int %c
OpSelectionMerge %23 None
OpSwitch %20 %23 5 %21 1 %22 2 %22 3 %22
%21 = OpLabel
OpBranch %24
%24 = OpLabel
OpLoopMerge %26 %27 None
OpBranch %25
%25 = OpLabel
%29 = OpAccessChain %_ptr_Uniform_int %o %int_2
%30 = OpLoad %int %29
OpSelectionMerge %33 None
OpSwitch %30 %32 10 %31 20 %31
%32 = OpLabel
OpBranch %27
%31 = OpLabel
%34 = OpLoad %int %c
%35 = OpLoad %int %c
%36 = OpIAdd %int %35 %34
OpStore %c %36
OpBranch %26
%33 = OpLabel
OpUnreachable
%27 = OpLabel
OpBranch %24
%26 = OpLabel
OpBranch %23
%22 = OpLabel
%42 = OpLoad %int %c
OpStore %a %42
OpBranch %18
%23 = OpLabel
%45 = OpLoad %int %c
%47 = OpIAdd %int %45 %int_1
OpStore %c %47
OpBranch %19
%19 = OpLabel
OpBranch %16
%18 = OpLabel
%48 = OpLoad %int %a
%49 = OpAccessChain %_ptr_Uniform_int %o %int_1
OpStore %49 %48
OpReturn
OpFunctionEnd