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

55 lines
2.2 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %frag_main "frag_main" %tint_symbol %tint_symbol_1 %tint_symbol_2
OpExecutionMode %frag_main OriginUpperLeft
OpName %S "S"
OpMemberName %S 0 "f"
OpMemberName %S 1 "u"
OpMemberName %S 2 "v"
OpName %output "output"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %frag_main "frag_main"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 128
OpDecorate %output NonReadable
OpDecorate %output DescriptorSet 0
OpDecorate %output Binding 0
OpDecorate %tint_symbol Location 0
OpDecorate %tint_symbol_1 Location 1
OpDecorate %tint_symbol_2 BuiltIn FragCoord
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %float %uint %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%output = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%_ptr_Input_float = OpTypePointer Input %float
%tint_symbol = OpVariable %_ptr_Input_float Input
%_ptr_Input_uint = OpTypePointer Input %uint
%tint_symbol_1 = OpVariable %_ptr_Input_uint Input
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol_2 = OpVariable %_ptr_Input_v4float Input
%void = OpTypeVoid
%13 = OpTypeFunction %void
%frag_main = OpFunction %void None %13
%16 = OpLabel
%17 = OpLoad %float %tint_symbol
%18 = OpLoad %uint %tint_symbol_1
%19 = OpLoad %v4float %tint_symbol_2
%20 = OpCompositeConstruct %S %17 %18 %19
%21 = OpCompositeExtract %float %20 0
%22 = OpCompositeExtract %uint %20 1
%23 = OpCompositeExtract %v4float %20 2
OpStore %output %20
OpReturn
OpFunctionEnd