dawn-cmake/test/benchmark/simple_fragment.wgsl.expected.spvasm
Ben Clayton be2362b18c benchmarks: Add a basic set of benchmarks
Add google benchmark to the DEPs.

Implement a basic set of benchmarks for each of the writers and the WGSL parser.

Add build rules for CMake. GN build rules TODO.

Add a simple go tool (ported from Marl) to diff two benchmarks. Less
noisy than the one provided by google benchmark.

Bug: tint:1378
Change-Id: I73cf92c5d9fd2d3bfac8f264864fd774afbd5d01
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/76840
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-01-18 18:58:16 +00:00

51 lines
1.9 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %color_1 %color_2
OpExecutionMode %main OriginUpperLeft
OpName %color_1 "color_1"
OpName %color_2 "color_2"
OpName %Output "Output"
OpMemberName %Output 0 "color"
OpName %Input "Input"
OpMemberName %Input 0 "color"
OpName %main_inner "main_inner"
OpName %in "in"
OpName %main "main"
OpDecorate %color_1 Location 0
OpDecorate %color_2 Location 0
OpMemberDecorate %Output 0 Offset 0
OpMemberDecorate %Input 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%color_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%color_2 = OpVariable %_ptr_Output_v4float Output %7
%Output = OpTypeStruct %v4float
%Input = OpTypeStruct %v4float
%8 = OpTypeFunction %Output %Input
%void = OpTypeVoid
%16 = OpTypeFunction %void
%main_inner = OpFunction %Output None %8
%in = OpFunctionParameter %Input
%13 = OpLabel
%14 = OpCompositeExtract %v4float %in 0
%15 = OpCompositeConstruct %Output %14
OpReturnValue %15
OpFunctionEnd
%main = OpFunction %void None %16
%19 = OpLabel
%21 = OpLoad %v4float %color_1
%22 = OpCompositeConstruct %Input %21
%20 = OpFunctionCall %Output %main_inner %22
%23 = OpCompositeExtract %v4float %20 0
OpStore %color_2 %23
OpReturn
OpFunctionEnd