mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +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>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
; Test: SpvParserTest_BitwiseAnd_SpvBinaryBitTest_EmitExpression_1.spvasm
|
|
; SPIR-V
|
|
; Version: 1.0
|
|
; Generator: Khronos SPIR-V Tools Assembler; 0
|
|
; Bound: 101
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical Simple
|
|
OpEntryPoint Fragment %100 "main"
|
|
OpExecutionMode %100 OriginUpperLeft
|
|
%void = OpTypeVoid
|
|
%3 = OpTypeFunction %void
|
|
%uint = OpTypeInt 32 0
|
|
%int = OpTypeInt 32 1
|
|
%float = OpTypeFloat 32
|
|
%uint_10 = OpConstant %uint 10
|
|
%uint_20 = OpConstant %uint 20
|
|
%int_30 = OpConstant %int 30
|
|
%int_40 = OpConstant %int 40
|
|
%float_50 = OpConstant %float 50
|
|
%float_60 = OpConstant %float 60
|
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%v2uint = OpTypeVector %uint 2
|
|
%v2int = OpTypeVector %int 2
|
|
%v2float = OpTypeVector %float 2
|
|
%19 = OpConstantComposite %v2uint %uint_10 %uint_20
|
|
%20 = OpConstantComposite %v2uint %uint_20 %uint_10
|
|
%21 = OpConstantComposite %v2int %int_30 %int_40
|
|
%22 = OpConstantComposite %v2int %int_40 %int_30
|
|
%23 = OpConstantComposite %v2float %float_50 %float_60
|
|
%24 = OpConstantComposite %v2float %float_60 %float_50
|
|
%100 = OpFunction %void None %3
|
|
%25 = OpLabel
|
|
%1 = OpBitwiseAnd %int %int_30 %int_40
|
|
OpReturn
|
|
OpFunctionEnd
|
|
|