mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 06:03:34 +00:00
The expected output is far from perfect, and the generated HLSL and MSL isn't even validated yet, so may be incorrect. However, by committing the generated output, we get clear examples of the currently generated output of each backend. As we land fixes and improvements to each backend, the presubmits will require us to update the expected test output, and so code reviews will include diffs of each backend's generated output. Change-Id: I5c2a9e5b796d0ab75b3ec4c7f8ad00a0a2ab166f Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51224 Commit-Queue: Ben Clayton <bclayton@chromium.org> Reviewed-by: David Neto <dneto@google.com>
89 lines
3.9 KiB
Plaintext
89 lines
3.9 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 51
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Vertex %vtx_main "vtx_main" %tint_pointsize %tint_symbol %tint_symbol_2
|
|
OpEntryPoint Fragment %frag_main "frag_main" %tint_symbol_5
|
|
OpExecutionMode %frag_main OriginUpperLeft
|
|
OpName %tint_pointsize "tint_pointsize"
|
|
OpName %pos "pos"
|
|
OpName %tint_symbol "tint_symbol"
|
|
OpName %tint_symbol_2 "tint_symbol_2"
|
|
OpName %tint_symbol_5 "tint_symbol_5"
|
|
OpName %tint_symbol_3 "tint_symbol_3"
|
|
OpName %tint_symbol_1 "tint_symbol_1"
|
|
OpName %vtx_main "vtx_main"
|
|
OpName %tint_symbol_6 "tint_symbol_6"
|
|
OpName %tint_symbol_4 "tint_symbol_4"
|
|
OpName %frag_main "frag_main"
|
|
OpDecorate %tint_pointsize BuiltIn PointSize
|
|
OpDecorate %_arr_v2float_uint_3 ArrayStride 8
|
|
OpDecorate %tint_symbol BuiltIn VertexIndex
|
|
OpDecorate %tint_symbol_2 BuiltIn Position
|
|
OpDecorate %tint_symbol_5 Location 0
|
|
%float = OpTypeFloat 32
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
|
%4 = OpConstantNull %float
|
|
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
|
%v2float = OpTypeVector %float 2
|
|
%uint = OpTypeInt 32 0
|
|
%uint_3 = OpConstant %uint 3
|
|
%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
|
|
%float_0 = OpConstant %float 0
|
|
%float_0_5 = OpConstant %float 0.5
|
|
%11 = OpConstantComposite %v2float %float_0 %float_0_5
|
|
%float_n0_5 = OpConstant %float -0.5
|
|
%13 = OpConstantComposite %v2float %float_n0_5 %float_n0_5
|
|
%14 = OpConstantComposite %v2float %float_0_5 %float_n0_5
|
|
%pos = OpConstantComposite %_arr_v2float_uint_3 %11 %13 %14
|
|
%int = OpTypeInt 32 1
|
|
%_ptr_Input_int = OpTypePointer Input %int
|
|
%tint_symbol = OpVariable %_ptr_Input_int Input
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%22 = OpConstantNull %v4float
|
|
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %22
|
|
%tint_symbol_5 = OpVariable %_ptr_Output_v4float Output %22
|
|
%void = OpTypeVoid
|
|
%24 = OpTypeFunction %void %v4float
|
|
%29 = OpTypeFunction %void
|
|
%float_1 = OpConstant %float 1
|
|
%_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
|
|
%36 = OpConstantNull %_arr_v2float_uint_3
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
%50 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
|
%tint_symbol_3 = OpFunction %void None %24
|
|
%tint_symbol_1 = OpFunctionParameter %v4float
|
|
%28 = OpLabel
|
|
OpStore %tint_symbol_2 %tint_symbol_1
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%vtx_main = OpFunction %void None %29
|
|
%31 = OpLabel
|
|
%35 = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %36
|
|
OpStore %tint_pointsize %float_1
|
|
OpStore %35 %pos
|
|
%37 = OpLoad %int %tint_symbol
|
|
%39 = OpAccessChain %_ptr_Function_v2float %35 %37
|
|
%40 = OpLoad %v2float %39
|
|
%41 = OpCompositeExtract %float %40 0
|
|
%42 = OpCompositeExtract %float %40 1
|
|
%43 = OpCompositeConstruct %v4float %41 %42 %float_0 %float_1
|
|
%33 = OpFunctionCall %void %tint_symbol_3 %43
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_6 = OpFunction %void None %24
|
|
%tint_symbol_4 = OpFunctionParameter %v4float
|
|
%46 = OpLabel
|
|
OpStore %tint_symbol_5 %tint_symbol_4
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%frag_main = OpFunction %void None %29
|
|
%48 = OpLabel
|
|
%49 = OpFunctionCall %void %tint_symbol_6 %50
|
|
OpReturn
|
|
OpFunctionEnd
|