dawn-cmake/test/unittest/reader/spirv/SpvParserTest_CompositeInsert_Struct_DifferOnlyInMemberName.spvasm
David Neto d1a026ecd0 Add end-to-end corpus from Tint SPIR-V Reader
Add the unit tests samples from src/reader/spirv when:
- they are valid for Vulkan 1.0 (plus some common extensions)
- they should translate to valid WGSL

Bug: tint:1043
Change-Id: I40a01990dbc40aff5cf7ace0b1aabfd0e437f638
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60000
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-07-30 16:03:06 +00:00

35 lines
1.0 KiB
Plaintext

; Test: SpvParserTest_CompositeInsert_Struct_DifferOnlyInMemberName.spvasm
; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 101
; Schema: 0
OpCapability Shader
OpMemoryModel Logical Simple
OpEntryPoint Fragment %100 "main"
OpExecutionMode %100 OriginUpperLeft
OpName %var0 "var0"
OpName %var1 "var1"
OpMemberName %_struct_7 0 "algo"
OpMemberName %_struct_8 0 "rithm"
%void = OpTypeVoid
%10 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%uint_11 = OpConstant %uint 11
%_struct_7 = OpTypeStruct %uint
%_struct_8 = OpTypeStruct %uint
%_ptr_Function__struct_7 = OpTypePointer Function %_struct_7
%_ptr_Function__struct_8 = OpTypePointer Function %_struct_8
%100 = OpFunction %void None %10
%16 = OpLabel
%var0 = OpVariable %_ptr_Function__struct_7 Function
%var1 = OpVariable %_ptr_Function__struct_8 Function
%1 = OpLoad %_struct_7 %var0
%2 = OpCompositeInsert %_struct_7 %uint_10 %1 0
%3 = OpLoad %_struct_8 %var1
%4 = OpCompositeInsert %_struct_8 %uint_11 %3 0
OpReturn
OpFunctionEnd