dawn-cmake/test/shader_io/fragment_input_locations_struct.wgsl.expected.spvasm
James Price 11c6fcdb51 spirv: Use generic transform to process shader IO
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>
2021-08-05 17:34:19 +00:00

67 lines
2.7 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %loc0_1 %loc1_1 %loc2_1 %loc3_1
OpExecutionMode %main OriginUpperLeft
OpName %loc0_1 "loc0_1"
OpName %loc1_1 "loc1_1"
OpName %loc2_1 "loc2_1"
OpName %loc3_1 "loc3_1"
OpName %FragmentInputs "FragmentInputs"
OpMemberName %FragmentInputs 0 "loc0"
OpMemberName %FragmentInputs 1 "loc1"
OpMemberName %FragmentInputs 2 "loc2"
OpMemberName %FragmentInputs 3 "loc3"
OpName %main_inner "main_inner"
OpName %inputs "inputs"
OpName %main "main"
OpDecorate %loc0_1 Location 0
OpDecorate %loc0_1 Flat
OpDecorate %loc1_1 Location 1
OpDecorate %loc1_1 Flat
OpDecorate %loc2_1 Location 2
OpDecorate %loc3_1 Location 3
OpMemberDecorate %FragmentInputs 0 Offset 0
OpMemberDecorate %FragmentInputs 1 Offset 4
OpMemberDecorate %FragmentInputs 2 Offset 8
OpMemberDecorate %FragmentInputs 3 Offset 16
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%loc0_1 = OpVariable %_ptr_Input_int Input
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%loc1_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%_ptr_Input_float = OpTypePointer Input %float
%loc2_1 = OpVariable %_ptr_Input_float Input
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%loc3_1 = OpVariable %_ptr_Input_v4float Input
%void = OpTypeVoid
%FragmentInputs = OpTypeStruct %int %uint %float %v4float
%13 = OpTypeFunction %void %FragmentInputs
%23 = OpTypeFunction %void
%main_inner = OpFunction %void None %13
%inputs = OpFunctionParameter %FragmentInputs
%18 = OpLabel
%19 = OpCompositeExtract %int %inputs 0
%20 = OpCompositeExtract %uint %inputs 1
%21 = OpCompositeExtract %float %inputs 2
%22 = OpCompositeExtract %v4float %inputs 3
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%25 = OpLabel
%27 = OpLoad %int %loc0_1
%28 = OpLoad %uint %loc1_1
%29 = OpLoad %float %loc2_1
%30 = OpLoad %v4float %loc3_1
%31 = OpCompositeConstruct %FragmentInputs %27 %28 %29 %30
%26 = OpFunctionCall %void %main_inner %31
OpReturn
OpFunctionEnd