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>
56 lines
2.1 KiB
Plaintext
56 lines
2.1 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 41
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main"
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %main_1 "main_1"
|
|
OpName %main "main"
|
|
%void = OpTypeVoid
|
|
%1 = OpTypeFunction %void
|
|
%float = OpTypeFloat 32
|
|
%v3float = OpTypeVector %float 3
|
|
%float_50 = OpConstant %float 50
|
|
%float_60 = OpConstant %float 60
|
|
%float_70 = OpConstant %float 70
|
|
%10 = OpConstantComposite %v3float %float_50 %float_60 %float_70
|
|
%v2float = OpTypeVector %float 2
|
|
%13 = OpConstantComposite %v2float %float_60 %float_50
|
|
%14 = OpConstantComposite %v2float %float_50 %float_60
|
|
%mat2v3float = OpTypeMatrix %v3float 2
|
|
%main_1 = OpFunction %void None %1
|
|
%4 = OpLabel
|
|
%11 = OpFAdd %v3float %10 %10
|
|
%15 = OpFAdd %v2float %13 %14
|
|
%17 = OpCompositeExtract %float %15 0
|
|
%18 = OpCompositeExtract %float %11 0
|
|
%19 = OpFMul %float %17 %18
|
|
%20 = OpCompositeExtract %float %15 0
|
|
%21 = OpCompositeExtract %float %11 1
|
|
%22 = OpFMul %float %20 %21
|
|
%23 = OpCompositeExtract %float %15 0
|
|
%24 = OpCompositeExtract %float %11 2
|
|
%25 = OpFMul %float %23 %24
|
|
%26 = OpCompositeConstruct %v3float %19 %22 %25
|
|
%27 = OpCompositeExtract %float %15 1
|
|
%28 = OpCompositeExtract %float %11 0
|
|
%29 = OpFMul %float %27 %28
|
|
%30 = OpCompositeExtract %float %15 1
|
|
%31 = OpCompositeExtract %float %11 1
|
|
%32 = OpFMul %float %30 %31
|
|
%33 = OpCompositeExtract %float %15 1
|
|
%34 = OpCompositeExtract %float %11 2
|
|
%35 = OpFMul %float %33 %34
|
|
%36 = OpCompositeConstruct %v3float %29 %32 %35
|
|
%37 = OpCompositeConstruct %mat2v3float %26 %36
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %1
|
|
%39 = OpLabel
|
|
%40 = OpFunctionCall %void %main_1
|
|
OpReturn
|
|
OpFunctionEnd
|