mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +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>
70 lines
3.3 KiB
Plaintext
70 lines
3.3 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 37
|
|
; 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 %ComputeInputs0 "ComputeInputs0"
|
|
OpMemberName %ComputeInputs0 0 "local_invocation_id"
|
|
OpName %ComputeInputs1 "ComputeInputs1"
|
|
OpMemberName %ComputeInputs1 0 "workgroup_id"
|
|
OpName %main_inner "main_inner"
|
|
OpName %inputs0 "inputs0"
|
|
OpName %local_invocation_index "local_invocation_index"
|
|
OpName %global_invocation_id "global_invocation_id"
|
|
OpName %inputs1 "inputs1"
|
|
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 %ComputeInputs0 0 Offset 0
|
|
OpMemberDecorate %ComputeInputs1 0 Offset 0
|
|
%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
|
|
%ComputeInputs0 = OpTypeStruct %v3uint
|
|
%ComputeInputs1 = OpTypeStruct %v3uint
|
|
%9 = OpTypeFunction %void %ComputeInputs0 %uint %v3uint %ComputeInputs1
|
|
%27 = OpTypeFunction %void
|
|
%main_inner = OpFunction %void None %9
|
|
%inputs0 = OpFunctionParameter %ComputeInputs0
|
|
%local_invocation_index = OpFunctionParameter %uint
|
|
%global_invocation_id = OpFunctionParameter %v3uint
|
|
%inputs1 = OpFunctionParameter %ComputeInputs1
|
|
%18 = OpLabel
|
|
%19 = OpCompositeExtract %v3uint %inputs0 0
|
|
%20 = OpCompositeExtract %uint %19 0
|
|
%21 = OpIAdd %uint %20 %local_invocation_index
|
|
%22 = OpCompositeExtract %uint %global_invocation_id 0
|
|
%23 = OpIAdd %uint %21 %22
|
|
%24 = OpCompositeExtract %v3uint %inputs1 0
|
|
%25 = OpCompositeExtract %uint %24 0
|
|
%26 = OpIAdd %uint %23 %25
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %27
|
|
%29 = OpLabel
|
|
%31 = OpLoad %v3uint %local_invocation_id_1
|
|
%32 = OpCompositeConstruct %ComputeInputs0 %31
|
|
%33 = OpLoad %uint %local_invocation_index_1
|
|
%34 = OpLoad %v3uint %global_invocation_id_1
|
|
%35 = OpLoad %v3uint %workgroup_id_1
|
|
%36 = OpCompositeConstruct %ComputeInputs1 %35
|
|
%30 = OpFunctionCall %void %main_inner %32 %33 %34 %36
|
|
OpReturn
|
|
OpFunctionEnd
|