dawn-cmake/test/shader_io/compute_input_builtins_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
3.2 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %local_invocation_id_1 %local_invocation_index_1 %global_invocation_id_1 %workgroup_id_1
OpExecutionMode %main LocalSize 1 1 1
OpName %local_invocation_id_1 "local_invocation_id_1"
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %global_invocation_id_1 "global_invocation_id_1"
OpName %workgroup_id_1 "workgroup_id_1"
OpName %ComputeInputs "ComputeInputs"
OpMemberName %ComputeInputs 0 "local_invocation_id"
OpMemberName %ComputeInputs 1 "local_invocation_index"
OpMemberName %ComputeInputs 2 "global_invocation_id"
OpMemberName %ComputeInputs 3 "workgroup_id"
OpName %main_inner "main_inner"
OpName %inputs "inputs"
OpName %main "main"
OpDecorate %local_invocation_id_1 BuiltIn LocalInvocationId
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpDecorate %global_invocation_id_1 BuiltIn GlobalInvocationId
OpDecorate %workgroup_id_1 BuiltIn WorkgroupId
OpMemberDecorate %ComputeInputs 0 Offset 0
OpMemberDecorate %ComputeInputs 1 Offset 12
OpMemberDecorate %ComputeInputs 2 Offset 16
OpMemberDecorate %ComputeInputs 3 Offset 32
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%local_invocation_id_1 = OpVariable %_ptr_Input_v3uint Input
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%global_invocation_id_1 = OpVariable %_ptr_Input_v3uint Input
%workgroup_id_1 = OpVariable %_ptr_Input_v3uint Input
%void = OpTypeVoid
%ComputeInputs = OpTypeStruct %v3uint %uint %v3uint %v3uint
%9 = OpTypeFunction %void %ComputeInputs
%25 = OpTypeFunction %void
%main_inner = OpFunction %void None %9
%inputs = OpFunctionParameter %ComputeInputs
%14 = OpLabel
%15 = OpCompositeExtract %v3uint %inputs 0
%16 = OpCompositeExtract %uint %15 0
%17 = OpCompositeExtract %uint %inputs 1
%18 = OpIAdd %uint %16 %17
%19 = OpCompositeExtract %v3uint %inputs 2
%20 = OpCompositeExtract %uint %19 0
%21 = OpIAdd %uint %18 %20
%22 = OpCompositeExtract %v3uint %inputs 3
%23 = OpCompositeExtract %uint %22 0
%24 = OpIAdd %uint %21 %23
OpReturn
OpFunctionEnd
%main = OpFunction %void None %25
%27 = OpLabel
%29 = OpLoad %v3uint %local_invocation_id_1
%30 = OpLoad %uint %local_invocation_index_1
%31 = OpLoad %v3uint %global_invocation_id_1
%32 = OpLoad %v3uint %workgroup_id_1
%33 = OpCompositeConstruct %ComputeInputs %29 %30 %31 %32
%28 = OpFunctionCall %void %main_inner %33
OpReturn
OpFunctionEnd