mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 11:21:40 +00:00
The refactored CanonicalizeEntryPointIO transform makes it much easier to handle SPIR-V style IO as well, and doing this removes a lot of duplicated code. Remove all of the SPIR-V transform code for shader IO and vertex point size. Bug: tint:920 Change-Id: Id1b97517619b4d2fd09b45d5aee848259f3dfa77 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60840 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
56 lines
2.3 KiB
Plaintext
56 lines
2.3 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 28
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %frag_depth_1 %sample_mask_1
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpExecutionMode %main DepthReplacing
|
|
OpName %frag_depth_1 "frag_depth_1"
|
|
OpName %sample_mask_1 "sample_mask_1"
|
|
OpName %FragmentOutputs "FragmentOutputs"
|
|
OpMemberName %FragmentOutputs 0 "frag_depth"
|
|
OpMemberName %FragmentOutputs 1 "sample_mask"
|
|
OpName %main_inner "main_inner"
|
|
OpName %main "main"
|
|
OpDecorate %frag_depth_1 BuiltIn FragDepth
|
|
OpDecorate %_arr_uint_uint_1 ArrayStride 4
|
|
OpDecorate %sample_mask_1 BuiltIn SampleMask
|
|
OpMemberDecorate %FragmentOutputs 0 Offset 0
|
|
OpMemberDecorate %FragmentOutputs 1 Offset 4
|
|
%float = OpTypeFloat 32
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
|
%4 = OpConstantNull %float
|
|
%frag_depth_1 = OpVariable %_ptr_Output_float Output %4
|
|
%uint = OpTypeInt 32 0
|
|
%uint_1 = OpConstant %uint 1
|
|
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
|
%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1
|
|
%10 = OpConstantNull %_arr_uint_uint_1
|
|
%sample_mask_1 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %10
|
|
%FragmentOutputs = OpTypeStruct %float %uint
|
|
%11 = OpTypeFunction %FragmentOutputs
|
|
%float_1 = OpConstant %float 1
|
|
%16 = OpConstantComposite %FragmentOutputs %float_1 %uint_1
|
|
%void = OpTypeVoid
|
|
%17 = OpTypeFunction %void
|
|
%int = OpTypeInt 32 1
|
|
%int_0 = OpConstant %int 0
|
|
%_ptr_Output_uint = OpTypePointer Output %uint
|
|
%main_inner = OpFunction %FragmentOutputs None %11
|
|
%14 = OpLabel
|
|
OpReturnValue %16
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %17
|
|
%20 = OpLabel
|
|
%21 = OpFunctionCall %FragmentOutputs %main_inner
|
|
%22 = OpCompositeExtract %float %21 0
|
|
OpStore %frag_depth_1 %22
|
|
%26 = OpAccessChain %_ptr_Output_uint %sample_mask_1 %int_0
|
|
%27 = OpCompositeExtract %uint %21 1
|
|
OpStore %26 %27
|
|
OpReturn
|
|
OpFunctionEnd
|