dawn-cmake/test/shader_io/fragment_output_builtins_struct.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

58 lines
2.5 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1 %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpExecutionMode %main DepthReplacing
OpName %tint_symbol_1 "tint_symbol_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %FragmentOutputs "FragmentOutputs"
OpMemberName %FragmentOutputs 0 "frag_depth"
OpMemberName %FragmentOutputs 1 "sample_mask"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %tint_symbol_1 BuiltIn FragDepth
OpDecorate %_arr_uint_uint_1 ArrayStride 4
OpDecorate %tint_symbol_2 BuiltIn SampleMask
OpMemberDecorate %FragmentOutputs 0 Offset 0
OpMemberDecorate %FragmentOutputs 1 Offset 4
%float = OpTypeFloat 32
%_ptr_Output_float = OpTypePointer Output %float
%4 = OpConstantNull %float
%tint_symbol_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
%tint_symbol_2 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %10
%void = OpTypeVoid
%FragmentOutputs = OpTypeStruct %float %uint
%11 = OpTypeFunction %void %FragmentOutputs
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Output_uint = OpTypePointer Output %uint
%23 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%28 = OpConstantComposite %FragmentOutputs %float_1 %uint_1
%tint_symbol_3 = OpFunction %void None %11
%tint_symbol = OpFunctionParameter %FragmentOutputs
%16 = OpLabel
%17 = OpCompositeExtract %float %tint_symbol 0
OpStore %tint_symbol_1 %17
%21 = OpAccessChain %_ptr_Output_uint %tint_symbol_2 %int_0
%22 = OpCompositeExtract %uint %tint_symbol 1
OpStore %21 %22
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%25 = OpLabel
%26 = OpFunctionCall %void %tint_symbol_3 %28
OpReturn
OpFunctionEnd