dawn-cmake/test/unittest/reader/spirv/SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm
David Neto 667bc2d929 Roll SPIRV-Tools and SPIRV-Headers, fix spvasm
This picks up validation to ensure a struct of builtins on
the input or output interface is also decorated with Block.
See https://github.com/KhronosGroup/SPIRV-Tools/pull/4665

Fix SPIR-V in end2end tests that was breaking the rule.

Change-Id: Ic0e9c8936eb6b3f086b084d86b649e9e237fc3b3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/73242
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
2021-12-17 20:45:22 +00:00

37 lines
1.2 KiB
Plaintext

; Test: SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm
; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 102
; Schema: 0
OpCapability Shader
OpMemoryModel Logical Simple
OpEntryPoint Vertex %2 "main" %1
OpDecorate %_struct_10 Block
OpMemberDecorate %_struct_10 0 BuiltIn Position
OpMemberDecorate %_struct_10 1 BuiltIn PointSize
OpMemberDecorate %_struct_10 2 BuiltIn ClipDistance
OpMemberDecorate %_struct_10 3 BuiltIn CullDistance
%void = OpTypeVoid
%4 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_struct_10 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output__struct_10 = OpTypePointer Output %_struct_10
%1 = OpVariable %_ptr_Output__struct_10 Output
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_ptr_Output_float = OpTypePointer Output %float
%15 = OpConstantNull %float
%2 = OpFunction %void None %4
%16 = OpLabel
%100 = OpAccessChain %_ptr_Output_v4float %1 %uint_0
%101 = OpAccessChain %_ptr_Output_float %100 %uint_1
OpStore %101 %15
OpReturn
OpFunctionEnd