Files
wgpu/tests/out/spv/control-flow.spvasm
T
Jim Blandy b209d91168 [spv-out] Properly combine the fixes for #2035 and #2038.
The Vulkan decoration rules require us to distinguish vertex shader
inputs, fragment shader inputs, and everything else, so just pass the
stage to `Writer::write_varying`. Together with the SPIRV storage
class, this is sufficient to distinguish all the cases in a way that
closely follows the spec language.
2022-09-01 15:55:42 -07:00

138 lines
2.5 KiB
Plaintext

; SPIR-V
; Version: 1.1
; Generator: rspirv
; Bound: 69
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %44 "main" %41
OpExecutionMode %44 LocalSize 1 1 1
OpDecorate %41 BuiltIn GlobalInvocationId
%2 = OpTypeVoid
%4 = OpTypeInt 32 1
%3 = OpConstant %4 1
%5 = OpConstant %4 0
%6 = OpConstant %4 2
%7 = OpConstant %4 3
%8 = OpConstant %4 4
%10 = OpTypeInt 32 0
%9 = OpConstant %10 0
%11 = OpTypeVector %10 3
%15 = OpTypeFunction %2 %4
%21 = OpTypeFunction %2
%38 = OpTypePointer Function %4
%39 = OpConstantNull %4
%42 = OpTypePointer Input %11
%41 = OpVariable %42 Input
%46 = OpConstant %10 2
%47 = OpConstant %10 1
%48 = OpConstant %10 72
%49 = OpConstant %10 264
%14 = OpFunction %2 None %15
%13 = OpFunctionParameter %4
%12 = OpLabel
OpBranch %16
%16 = OpLabel
OpSelectionMerge %17 None
OpSwitch %13 %18
%18 = OpLabel
OpBranch %17
%17 = OpLabel
OpReturn
OpFunctionEnd
%20 = OpFunction %2 None %21
%19 = OpLabel
OpBranch %22
%22 = OpLabel
OpSelectionMerge %23 None
OpSwitch %5 %24 0 %25
%25 = OpLabel
OpBranch %23
%24 = OpLabel
OpBranch %23
%23 = OpLabel
OpReturn
OpFunctionEnd
%28 = OpFunction %2 None %15
%27 = OpFunctionParameter %4
%26 = OpLabel
OpBranch %29
%29 = OpLabel
OpBranch %30
%30 = OpLabel
OpLoopMerge %31 %33 None
OpBranch %32
%32 = OpLabel
OpSelectionMerge %34 None
OpSwitch %27 %35 1 %36
%36 = OpLabel
OpBranch %33
%35 = OpLabel
OpBranch %34
%34 = OpLabel
OpBranch %33
%33 = OpLabel
OpBranch %30
%31 = OpLabel
OpReturn
OpFunctionEnd
%44 = OpFunction %2 None %21
%40 = OpLabel
%37 = OpVariable %38 Function %39
%43 = OpLoad %11 %41
OpBranch %45
%45 = OpLabel
OpControlBarrier %46 %47 %48
OpControlBarrier %46 %46 %49
OpSelectionMerge %50 None
OpSwitch %3 %51
%51 = OpLabel
OpStore %37 %3
OpBranch %50
%50 = OpLabel
%52 = OpLoad %4 %37
OpSelectionMerge %53 None
OpSwitch %52 %54 1 %55 2 %56 3 %57 4 %58
%55 = OpLabel
OpStore %37 %5
OpBranch %53
%56 = OpLabel
OpStore %37 %3
OpBranch %53
%57 = OpLabel
OpStore %37 %6
OpBranch %58
%58 = OpLabel
OpStore %37 %7
OpBranch %54
%54 = OpLabel
OpStore %37 %8
OpBranch %53
%53 = OpLabel
OpSelectionMerge %59 None
OpSwitch %9 %60 0 %61
%61 = OpLabel
OpBranch %59
%60 = OpLabel
OpBranch %59
%59 = OpLabel
%62 = OpLoad %4 %37
OpSelectionMerge %63 None
OpSwitch %62 %64 1 %65 2 %66 3 %67 4 %68
%65 = OpLabel
OpStore %37 %5
OpBranch %63
%66 = OpLabel
OpStore %37 %3
OpReturn
%67 = OpLabel
OpStore %37 %6
OpBranch %68
%68 = OpLabel
OpReturn
%64 = OpLabel
OpStore %37 %7
OpReturn
%63 = OpLabel
OpReturn
OpFunctionEnd