tint/transform: Polyfill bit-shift with RHS modulo

Fixed: tint:1453
Fixed: tint:1543
Change-Id: Idb5af752d7a3bb9e181cc47430ad4ddfb707873d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108440
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2022-11-03 19:15:17 +00:00
committed by Dawn LUCI CQ
parent 91e27f25f9
commit 02f04d914d
47 changed files with 345 additions and 157 deletions

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 16
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -20,8 +20,11 @@
%uint_5 = OpConstant %uint 5
%uint_6 = OpConstant %uint 6
%14 = OpConstantComposite %v3uint %uint_4 %uint_5 %uint_6
%uint_31 = OpConstant %uint 31
%16 = OpConstantComposite %v3uint %uint_31 %uint_31 %uint_31
%f = OpFunction %void None %1
%4 = OpLabel
%15 = OpShiftLeftLogical %v3uint %10 %14
%17 = OpBitwiseAnd %v3uint %14 %16
%18 = OpShiftLeftLogical %v3uint %10 %17
OpReturn
OpFunctionEnd