dawn-cmake/test/bug/tint/413.spvasm.expected.spvasm
David Neto 1e19b55d19 spirv-reader: switch to HLSL-style pipeline IO
- When storing to sample_mask output, write to the 0th element
- Only make a return struct if it has members
- Adjust type signedness coercion when loading special builtins.
- Adapt tests

- Update expectations for end-to-end tests

- Handle sample_mask with stride
  Input variables normally don't have layout. But they can have it
  up through SPIR-V 1.4.
  Handle this case in the SPIR-V reader, by seeing through the
  intermediate alias type created for the strided array type.

Bug: tint:508
Change-Id: I0f19dc1305d3f250dbbc0698a602288c34245274
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54743
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-06-17 09:10:04 +00:00

61 lines
2.3 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %Src "Src"
OpName %Dst "Dst"
OpName %main_1 "main_1"
OpName %srcValue "srcValue"
OpName %main "main"
OpDecorate %Src NonWritable
OpDecorate %Src DescriptorSet 0
OpDecorate %Src Binding 0
OpDecorate %Dst NonReadable
OpDecorate %Dst DescriptorSet 0
OpDecorate %Dst Binding 1
%uint = OpTypeInt 32 0
%3 = OpTypeImage %uint 2D 0 0 0 2 R32ui
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
%Src = OpVariable %_ptr_UniformConstant_3 UniformConstant
%_ptr_UniformConstant_3_0 = OpTypePointer UniformConstant %3
%Dst = OpVariable %_ptr_UniformConstant_3_0 UniformConstant
%void = OpTypeVoid
%7 = OpTypeFunction %void
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%14 = OpConstantNull %v4uint
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_0 = OpConstant %int 0
%20 = OpConstantComposite %v2int %int_0 %int_0
%uint_0 = OpConstant %uint 0
%_ptr_Function_uint = OpTypePointer Function %uint
%int_1 = OpConstant %int 1
%main_1 = OpFunction %void None %7
%10 = OpLabel
%srcValue = OpVariable %_ptr_Function_v4uint Function %14
%16 = OpLoad %3 %Src
%15 = OpImageRead %v4uint %16 %20
OpStore %srcValue %15
%23 = OpAccessChain %_ptr_Function_uint %srcValue %uint_0
%24 = OpLoad %uint %23
%25 = OpAccessChain %_ptr_Function_uint %srcValue %uint_0
%26 = OpBitcast %uint %int_1
%28 = OpIAdd %uint %24 %26
OpStore %25 %28
%29 = OpLoad %v4uint %srcValue
%31 = OpLoad %3 %Dst
OpImageWrite %31 %20 %29
OpReturn
OpFunctionEnd
%main = OpFunction %void None %7
%33 = OpLabel
%34 = OpFunctionCall %void %main_1
OpReturn
OpFunctionEnd