mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 04:05:40 +00:00
Kindly donated by Brandon Jones and Austin Eng. Tint has been used to convert all the deprecated attributes to the new style. In doing so, comments have been stripped. These are not massively important for the benchmarking. Bindings have also been adjusted to be sequential and unique so that the MSL backend doesn't have to deal with binding remapping. Existing benchmark files that used an underscore '_' have been renamed to use a dash '-' instead, to match the new files. Change-Id: If5fb507b981f107ed570f6eedb55b232448f67aa Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77443 Reviewed-by: Brandon Jones <bajones@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
233 lines
9.9 KiB
Plaintext
233 lines
9.9 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 138
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
%76 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Vertex %vert_main "vert_main" %position_1 %color_1 %Position_1 %v_color_1 %vertex_point_size
|
|
OpEntryPoint Fragment %frag_main "frag_main" %v_color_2 %value_1
|
|
OpExecutionMode %frag_main OriginUpperLeft
|
|
OpName %position_1 "position_1"
|
|
OpName %color_1 "color_1"
|
|
OpName %Position_1 "Position_1"
|
|
OpName %v_color_1 "v_color_1"
|
|
OpName %vertex_point_size "vertex_point_size"
|
|
OpName %v_color_2 "v_color_2"
|
|
OpName %value_1 "value_1"
|
|
OpName %Time "Time"
|
|
OpMemberName %Time 0 "value"
|
|
OpName %time "time"
|
|
OpName %Uniforms "Uniforms"
|
|
OpMemberName %Uniforms 0 "scale"
|
|
OpMemberName %Uniforms 1 "offsetX"
|
|
OpMemberName %Uniforms 2 "offsetY"
|
|
OpMemberName %Uniforms 3 "scalar"
|
|
OpMemberName %Uniforms 4 "scalarOffset"
|
|
OpName %uniforms "uniforms"
|
|
OpName %VertexOutput "VertexOutput"
|
|
OpMemberName %VertexOutput 0 "Position"
|
|
OpMemberName %VertexOutput 1 "v_color"
|
|
OpName %vert_main_inner "vert_main_inner"
|
|
OpName %position "position"
|
|
OpName %color "color"
|
|
OpName %fade "fade"
|
|
OpName %xpos "xpos"
|
|
OpName %ypos "ypos"
|
|
OpName %angle "angle"
|
|
OpName %xrot "xrot"
|
|
OpName %yrot "yrot"
|
|
OpName %output "output"
|
|
OpName %vert_main "vert_main"
|
|
OpName %frag_main_inner "frag_main_inner"
|
|
OpName %v_color "v_color"
|
|
OpName %frag_main "frag_main"
|
|
OpDecorate %position_1 Location 0
|
|
OpDecorate %color_1 Location 1
|
|
OpDecorate %Position_1 BuiltIn Position
|
|
OpDecorate %v_color_1 Location 0
|
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
OpDecorate %v_color_2 Location 0
|
|
OpDecorate %value_1 Location 0
|
|
OpDecorate %Time Block
|
|
OpMemberDecorate %Time 0 Offset 0
|
|
OpDecorate %time NonWritable
|
|
OpDecorate %time Binding 0
|
|
OpDecorate %time DescriptorSet 0
|
|
OpDecorate %Uniforms Block
|
|
OpMemberDecorate %Uniforms 0 Offset 0
|
|
OpMemberDecorate %Uniforms 1 Offset 4
|
|
OpMemberDecorate %Uniforms 2 Offset 8
|
|
OpMemberDecorate %Uniforms 3 Offset 12
|
|
OpMemberDecorate %Uniforms 4 Offset 16
|
|
OpDecorate %uniforms NonWritable
|
|
OpDecorate %uniforms Binding 1
|
|
OpDecorate %uniforms DescriptorSet 0
|
|
OpMemberDecorate %VertexOutput 0 Offset 0
|
|
OpMemberDecorate %VertexOutput 1 Offset 16
|
|
%float = OpTypeFloat 32
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
|
%position_1 = OpVariable %_ptr_Input_v4float Input
|
|
%color_1 = OpVariable %_ptr_Input_v4float Input
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%8 = OpConstantNull %v4float
|
|
%Position_1 = OpVariable %_ptr_Output_v4float Output %8
|
|
%v_color_1 = OpVariable %_ptr_Output_v4float Output %8
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
|
%12 = OpConstantNull %float
|
|
%vertex_point_size = OpVariable %_ptr_Output_float Output %12
|
|
%v_color_2 = OpVariable %_ptr_Input_v4float Input
|
|
%value_1 = OpVariable %_ptr_Output_v4float Output %8
|
|
%Time = OpTypeStruct %float
|
|
%_ptr_Uniform_Time = OpTypePointer Uniform %Time
|
|
%time = OpVariable %_ptr_Uniform_Time Uniform
|
|
%Uniforms = OpTypeStruct %float %float %float %float %float
|
|
%_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms
|
|
%uniforms = OpVariable %_ptr_Uniform_Uniforms Uniform
|
|
%VertexOutput = OpTypeStruct %v4float %v4float
|
|
%21 = OpTypeFunction %VertexOutput %v4float %v4float
|
|
%uint = OpTypeInt 32 0
|
|
%uint_4 = OpConstant %uint 4
|
|
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
|
%uint_0 = OpConstant %uint 0
|
|
%uint_3 = OpConstant %uint 3
|
|
%float_10 = OpConstant %float 10
|
|
%float_1 = OpConstant %float 1
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%float_0_5 = OpConstant %float 0.5
|
|
%bool = OpTypeBool
|
|
%float_2 = OpConstant %float 2
|
|
%float_3_14159012 = OpConstant %float 3.14159012
|
|
%uint_1 = OpConstant %uint 1
|
|
%uint_2 = OpConstant %uint 2
|
|
%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
|
|
%107 = OpConstantNull %VertexOutput
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
|
%float_0 = OpConstant %float 0
|
|
%void = OpTypeVoid
|
|
%121 = OpTypeFunction %void
|
|
%130 = OpTypeFunction %v4float %v4float
|
|
%vert_main_inner = OpFunction %VertexOutput None %21
|
|
%position = OpFunctionParameter %v4float
|
|
%color = OpFunctionParameter %v4float
|
|
%26 = OpLabel
|
|
%fade = OpVariable %_ptr_Function_float Function %12
|
|
%xpos = OpVariable %_ptr_Function_float Function %12
|
|
%ypos = OpVariable %_ptr_Function_float Function %12
|
|
%angle = OpVariable %_ptr_Function_float Function %12
|
|
%xrot = OpVariable %_ptr_Function_float Function %12
|
|
%yrot = OpVariable %_ptr_Function_float Function %12
|
|
%output = OpVariable %_ptr_Function_VertexOutput Function %107
|
|
%30 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4
|
|
%31 = OpLoad %float %30
|
|
%33 = OpAccessChain %_ptr_Uniform_float %time %uint_0
|
|
%34 = OpLoad %float %33
|
|
%36 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_3
|
|
%37 = OpLoad %float %36
|
|
%38 = OpFMul %float %34 %37
|
|
%40 = OpFDiv %float %38 %float_10
|
|
%41 = OpFAdd %float %31 %40
|
|
%43 = OpFRem %float %41 %float_1
|
|
OpStore %fade %43
|
|
%46 = OpLoad %float %fade
|
|
%48 = OpFOrdLessThan %bool %46 %float_0_5
|
|
OpSelectionMerge %50 None
|
|
OpBranchConditional %48 %51 %52
|
|
%51 = OpLabel
|
|
%53 = OpLoad %float %fade
|
|
%55 = OpFMul %float %53 %float_2
|
|
OpStore %fade %55
|
|
OpBranch %50
|
|
%52 = OpLabel
|
|
%56 = OpLoad %float %fade
|
|
%57 = OpFSub %float %float_1 %56
|
|
%58 = OpFMul %float %57 %float_2
|
|
OpStore %fade %58
|
|
OpBranch %50
|
|
%50 = OpLabel
|
|
%59 = OpCompositeExtract %float %position 0
|
|
%60 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0
|
|
%61 = OpLoad %float %60
|
|
%62 = OpFMul %float %59 %61
|
|
OpStore %xpos %62
|
|
%64 = OpCompositeExtract %float %position 1
|
|
%65 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0
|
|
%66 = OpLoad %float %65
|
|
%67 = OpFMul %float %64 %66
|
|
OpStore %ypos %67
|
|
%70 = OpFMul %float %float_3_14159012 %float_2
|
|
%71 = OpLoad %float %fade
|
|
%72 = OpFMul %float %70 %71
|
|
OpStore %angle %72
|
|
%74 = OpLoad %float %xpos
|
|
%77 = OpLoad %float %angle
|
|
%75 = OpExtInst %float %76 Cos %77
|
|
%78 = OpFMul %float %74 %75
|
|
%79 = OpLoad %float %ypos
|
|
%81 = OpLoad %float %angle
|
|
%80 = OpExtInst %float %76 Sin %81
|
|
%82 = OpFMul %float %79 %80
|
|
%83 = OpFSub %float %78 %82
|
|
OpStore %xrot %83
|
|
%85 = OpLoad %float %xpos
|
|
%87 = OpLoad %float %angle
|
|
%86 = OpExtInst %float %76 Sin %87
|
|
%88 = OpFMul %float %85 %86
|
|
%89 = OpLoad %float %ypos
|
|
%91 = OpLoad %float %angle
|
|
%90 = OpExtInst %float %76 Cos %91
|
|
%92 = OpFMul %float %89 %90
|
|
%93 = OpFAdd %float %88 %92
|
|
OpStore %yrot %93
|
|
%95 = OpLoad %float %xrot
|
|
%97 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_1
|
|
%98 = OpLoad %float %97
|
|
%99 = OpFAdd %float %95 %98
|
|
OpStore %xpos %99
|
|
%100 = OpLoad %float %yrot
|
|
%102 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_2
|
|
%103 = OpLoad %float %102
|
|
%104 = OpFAdd %float %100 %103
|
|
OpStore %ypos %104
|
|
%109 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
|
%110 = OpLoad %float %fade
|
|
%111 = OpLoad %float %fade
|
|
%112 = OpFSub %float %float_1 %111
|
|
%114 = OpCompositeConstruct %v4float %110 %112 %float_0 %float_1
|
|
%115 = OpFAdd %v4float %114 %color
|
|
OpStore %109 %115
|
|
%116 = OpAccessChain %_ptr_Function_v4float %output %uint_0
|
|
%117 = OpLoad %float %xpos
|
|
%118 = OpLoad %float %ypos
|
|
%119 = OpCompositeConstruct %v4float %117 %118 %float_0 %float_1
|
|
OpStore %116 %119
|
|
%120 = OpLoad %VertexOutput %output
|
|
OpReturnValue %120
|
|
OpFunctionEnd
|
|
%vert_main = OpFunction %void None %121
|
|
%124 = OpLabel
|
|
%126 = OpLoad %v4float %position_1
|
|
%127 = OpLoad %v4float %color_1
|
|
%125 = OpFunctionCall %VertexOutput %vert_main_inner %126 %127
|
|
%128 = OpCompositeExtract %v4float %125 0
|
|
OpStore %Position_1 %128
|
|
%129 = OpCompositeExtract %v4float %125 1
|
|
OpStore %v_color_1 %129
|
|
OpStore %vertex_point_size %float_1
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%frag_main_inner = OpFunction %v4float None %130
|
|
%v_color = OpFunctionParameter %v4float
|
|
%133 = OpLabel
|
|
OpReturnValue %v_color
|
|
OpFunctionEnd
|
|
%frag_main = OpFunction %void None %121
|
|
%135 = OpLabel
|
|
%137 = OpLoad %v4float %v_color_2
|
|
%136 = OpFunctionCall %v4float %frag_main_inner %137
|
|
OpStore %value_1 %136
|
|
OpReturn
|
|
OpFunctionEnd
|