mesa/src
Juan A. Suarez Romero acd0dd3b4b nir/lower_double_ops: relax lower mod()
Currently when lowering mod() we add an extra instruction so if
mod(a,b) == b then 0 is returned instead of b, as mathematically
mod(a,b) is in the interval [0, b).

But Vulkan spec has relaxed this restriction, and allows the result to
be in the interval [0, b].

For the OpenGL case, while the spec does not allow this behaviour, due
the allowed precision errors we can end up having the same result, so
from a practical point of view, this behaviour is allowed (see
https://github.com/KhronosGroup/VK-GL-CTS/issues/51).

This commit takes this in account to remove the extra instruction
required to return 0 instead.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4118>
2020-03-12 16:42:52 +00:00
..
amd amd/llvm: Fix divergent descriptor indexing. (v3) 2020-03-12 16:12:02 +00:00
broadcom util/ra: spiff out select_reg_callback 2020-03-10 16:01:39 +00:00
compiler nir/lower_double_ops: relax lower mod() 2020-03-12 16:42:52 +00:00
drm-shim drm-shim: fix EOF case 2019-11-13 12:39:14 +00:00
egl egl/android: set window usage flags 2020-03-12 11:03:32 +09:00
etnaviv etnaviv: drm-shim: add GC400 2020-01-30 04:05:39 +00:00
freedreno turnip: Add tu6_control struct. 2020-03-12 03:10:17 +00:00
gallium iris: toggle on PIPE_CAP_MIXED_COLOR_DEPTH_BITS 2020-03-12 05:08:48 +00:00
gbm meson: move the generic symbols check arguments to a common variable 2019-11-05 20:30:47 +00:00
getopt meson: build getopt when using msvc 2019-09-10 20:36:47 +00:00
glx Revert "glx: convert glx_config_create_list to one big calloc" 2020-03-04 10:19:48 +00:00
gtest meson: gtest needs pthreads 2019-11-07 06:11:19 -08:00
hgl haiku: fix Mesa build 2019-10-01 10:31:02 +00:00
imgui meson: drop intel_ prefix on imgui_core 2019-12-10 15:16:02 +00:00
intel intel/fs: Fix NULL destinations on 3-source instructions again after late DCE 2020-03-12 08:22:43 -07:00
loader loader: Fix leak of kernel driver name 2020-01-30 10:08:17 -08:00
mapi glthread: fall back if a param size is non-zero and a pointer param is NULL 2020-03-06 01:06:14 +00:00
mesa mesa: don't unroll glMultiDrawElements with user indices for gallium 2020-03-11 18:45:28 +00:00
panfrost pan/bi: Interpret register allocation results 2020-03-12 12:41:08 +00:00
util util/ra: move NO_REG to header 2020-03-10 16:01:39 +00:00
vulkan vulkan/wsi: fix cleanup when dup() fails 2020-03-10 22:43:25 +00:00
meson.build meson: only build imgui when needed 2019-11-25 07:51:56 +00:00
SConscript