mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
https://github.com/gpuweb/gpuweb/pull/1945 changes the SPIR-V mapping of this operator so that it now maps to OpFRem instead of OpFMod. Polyfill OpFMod with `x - y * floor(x / y)` Also map the MSL output of this operator to use `fmod()`. Behavior of this operator is now consistent across all backends. Fixed: tint:945 Fixed: tint:977 Fixed: tint:1010 Change-Id: Iefa009b905989c55ace24e073ab0e261c7cf69b0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58393 Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
28 lines
925 B
Plaintext
28 lines
925 B
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 16
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %f "f"
|
|
OpExecutionMode %f LocalSize 1 1 1
|
|
OpName %f "f"
|
|
%void = OpTypeVoid
|
|
%1 = OpTypeFunction %void
|
|
%float = OpTypeFloat 32
|
|
%v3float = OpTypeVector %float 3
|
|
%float_1 = OpConstant %float 1
|
|
%float_2 = OpConstant %float 2
|
|
%float_3 = OpConstant %float 3
|
|
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
|
%float_4 = OpConstant %float 4
|
|
%float_5 = OpConstant %float 5
|
|
%float_6 = OpConstant %float 6
|
|
%14 = OpConstantComposite %v3float %float_4 %float_5 %float_6
|
|
%f = OpFunction %void None %1
|
|
%4 = OpLabel
|
|
%15 = OpFRem %v3float %10 %14
|
|
OpReturn
|
|
OpFunctionEnd
|