mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 20:01:22 +00:00
This is required to handle materialized values, and for constant expressions. Bug: tint:1504 Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 27
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %f "f"
|
|
OpExecutionMode %f LocalSize 1 1 1
|
|
OpName %f "f"
|
|
OpName %i "i"
|
|
%void = OpTypeVoid
|
|
%1 = OpTypeFunction %void
|
|
%int = OpTypeInt 32 1
|
|
%6 = OpConstantNull %int
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%int_4 = OpConstant %int 4
|
|
%bool = OpTypeBool
|
|
%int_1 = OpConstant %int 1
|
|
%f = OpFunction %void None %1
|
|
%4 = OpLabel
|
|
%i = OpVariable %_ptr_Function_int Function %6
|
|
OpStore %i %6
|
|
OpBranch %9
|
|
%9 = OpLabel
|
|
OpLoopMerge %10 %11 None
|
|
OpBranch %12
|
|
%12 = OpLabel
|
|
%14 = OpLoad %int %i
|
|
%16 = OpSLessThan %bool %14 %int_4
|
|
%13 = OpLogicalNot %bool %16
|
|
OpSelectionMerge %18 None
|
|
OpBranchConditional %13 %19 %18
|
|
%19 = OpLabel
|
|
OpBranch %10
|
|
%18 = OpLabel
|
|
%21 = OpLoad %int %i
|
|
OpSelectionMerge %20 None
|
|
OpSwitch %21 %22 0 %23
|
|
%23 = OpLabel
|
|
OpBranch %11
|
|
%22 = OpLabel
|
|
OpBranch %20
|
|
%20 = OpLabel
|
|
OpBranch %11
|
|
%11 = OpLabel
|
|
%24 = OpLoad %int %i
|
|
%26 = OpIAdd %int %24 %int_1
|
|
OpStore %i %26
|
|
OpBranch %9
|
|
%10 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|