mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
Add the unit tests samples from src/reader/spirv when: - they are valid for Vulkan 1.0 (plus some common extensions) - they should translate to valid WGSL Bug: tint:1043 Change-Id: I40a01990dbc40aff5cf7ace0b1aabfd0e437f638 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60000 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: David Neto <dneto@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 33
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main"
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %x_1 "x_1"
|
|
OpName %x_7 "x_7"
|
|
OpName %x_8 "x_8"
|
|
OpName %main_1 "main_1"
|
|
OpName %x_2_phi "x_2_phi"
|
|
OpName %main "main"
|
|
%uint = OpTypeInt 32 0
|
|
%_ptr_Private_uint = OpTypePointer Private %uint
|
|
%4 = OpConstantNull %uint
|
|
%x_1 = OpVariable %_ptr_Private_uint Private %4
|
|
%bool = OpTypeBool
|
|
%_ptr_Private_bool = OpTypePointer Private %bool
|
|
%8 = OpConstantNull %bool
|
|
%x_7 = OpVariable %_ptr_Private_bool Private %8
|
|
%x_8 = OpVariable %_ptr_Private_bool Private %8
|
|
%void = OpTypeVoid
|
|
%10 = OpTypeFunction %void
|
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
|
%uint_0 = OpConstant %uint 0
|
|
%uint_1 = OpConstant %uint 1
|
|
%main_1 = OpFunction %void None %10
|
|
%13 = OpLabel
|
|
%x_2_phi = OpVariable %_ptr_Function_uint Function %4
|
|
%14 = OpLoad %bool %x_7
|
|
%15 = OpLoad %bool %x_8
|
|
OpBranch %16
|
|
%16 = OpLabel
|
|
OpLoopMerge %17 %18 None
|
|
OpBranch %19
|
|
%19 = OpLabel
|
|
OpSelectionMerge %22 None
|
|
OpBranchConditional %14 %23 %22
|
|
%23 = OpLabel
|
|
OpBranch %17
|
|
%22 = OpLabel
|
|
OpSelectionMerge %24 None
|
|
OpBranchConditional %15 %25 %26
|
|
%25 = OpLabel
|
|
OpStore %x_2_phi %uint_0
|
|
OpBranch %18
|
|
%26 = OpLabel
|
|
OpStore %x_2_phi %uint_1
|
|
OpBranch %18
|
|
%24 = OpLabel
|
|
OpStore %x_2_phi %uint_0
|
|
OpBranch %18
|
|
%18 = OpLabel
|
|
%29 = OpLoad %uint %x_2_phi
|
|
OpStore %x_1 %29
|
|
OpBranch %16
|
|
%17 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %10
|
|
%31 = OpLabel
|
|
%32 = OpFunctionCall %void %main_1
|
|
OpReturn
|
|
OpFunctionEnd
|