dawn-cmake/test/intrinsics/textureGather/i32/red.wgsl.expected.spvasm
Ben Clayton 3703522d41 Implement textureGather, textureGatherCompare
All writers implemented, along with resolving and validation.

TODO: SPIR-V Reader.

Bug: tint:1330
Change-Id: I8ba2f6023749474f80efb8a5422ac187e6c73a69
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71820
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2021-12-08 19:54:08 +00:00

45 lines
1.6 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 25
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main"
OpExecutionMode %main OriginUpperLeft
OpName %t "t"
OpName %s "s"
OpName %main "main"
OpName %res "res"
OpDecorate %t DescriptorSet 1
OpDecorate %t Binding 0
OpDecorate %s DescriptorSet 1
OpDecorate %s Binding 1
%int = OpTypeInt 32 1
%3 = OpTypeImage %int 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
%t = OpVariable %_ptr_UniformConstant_3 UniformConstant
%7 = OpTypeSampler
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
%s = OpVariable %_ptr_UniformConstant_7 UniformConstant
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v4int = OpTypeVector %int 4
%16 = OpTypeSampledImage %3
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%20 = OpConstantNull %v2float
%int_0 = OpConstant %int 0
%_ptr_Function_v4int = OpTypePointer Function %v4int
%24 = OpConstantNull %v4int
%main = OpFunction %void None %8
%11 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %24
%14 = OpLoad %7 %s
%15 = OpLoad %3 %t
%17 = OpSampledImage %16 %15 %14
%12 = OpImageGather %v4int %17 %20 %int_0
OpStore %res %12
OpReturn
OpFunctionEnd