dawn-cmake/test/shader_io/compute_input_mixed.wgsl.expected.spvasm
James Price bb0496e52a test: Add E2E test coverage for shader IO
This provides much more complete coverage than what we have in the
unit tests. We now test:
- All builtins, for all stages, both struct and non-struct
- Multiple location attributes for vertex and fragment stages, both
  struct and non-struct
- Mixing builtins and location attributes, whilst mixing struct and
  non-struct
- A few "interesting" cases of IO structs being shared between
  different functions, stages, and with an SSBO variable

There are 7 skipped tests for MSL due to two different MSL bugs which
will be fixed in upcoming patches.

Change-Id: I8b802591762c8ff018e01bf37838551e353162b1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53120
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
2021-06-03 09:38:34 +00:00

56 lines
2.4 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 30
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %tint_symbol %tint_symbol_4 %tint_symbol_2 %tint_symbol_3
OpExecutionMode %main LocalSize 1 1 1
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_4 "tint_symbol_4"
OpName %main "main"
OpName %ComputeInputs0 "ComputeInputs0"
OpMemberName %ComputeInputs0 0 "local_invocation_id"
OpName %ComputeInputs1 "ComputeInputs1"
OpMemberName %ComputeInputs1 0 "workgroup_id"
OpDecorate %tint_symbol BuiltIn LocalInvocationId
OpDecorate %tint_symbol_2 BuiltIn LocalInvocationIndex
OpDecorate %tint_symbol_3 BuiltIn GlobalInvocationId
OpDecorate %tint_symbol_4 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
%tint_symbol = OpVariable %_ptr_Input_v3uint Input
%_ptr_Input_uint = OpTypePointer Input %uint
%tint_symbol_2 = OpVariable %_ptr_Input_uint Input
%tint_symbol_3 = OpVariable %_ptr_Input_v3uint Input
%tint_symbol_4 = OpVariable %_ptr_Input_v3uint Input
%void = OpTypeVoid
%9 = OpTypeFunction %void
%ComputeInputs0 = OpTypeStruct %v3uint
%ComputeInputs1 = OpTypeStruct %v3uint
%uint_0 = OpConstant %uint 0
%main = OpFunction %void None %9
%12 = OpLabel
%14 = OpLoad %v3uint %tint_symbol
%15 = OpCompositeConstruct %ComputeInputs0 %14
%17 = OpLoad %v3uint %tint_symbol_4
%18 = OpCompositeConstruct %ComputeInputs1 %17
%19 = OpCompositeExtract %v3uint %15 0
%20 = OpCompositeExtract %uint %19 0
%21 = OpLoad %uint %tint_symbol_2
%22 = OpIAdd %uint %20 %21
%24 = OpAccessChain %_ptr_Input_uint %tint_symbol_3 %uint_0
%25 = OpLoad %uint %24
%26 = OpIAdd %uint %22 %25
%27 = OpCompositeExtract %v3uint %18 0
%28 = OpCompositeExtract %uint %27 0
%29 = OpIAdd %uint %26 %28
OpReturn
OpFunctionEnd