mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 12:40:23 +01:00
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> |
||
|---|---|---|
| .. | ||
| amd | ||
| broadcom | ||
| compiler | ||
| drm-shim | ||
| egl | ||
| etnaviv | ||
| freedreno | ||
| gallium | ||
| gbm | ||
| getopt | ||
| glx | ||
| gtest | ||
| hgl | ||
| imgui | ||
| intel | ||
| loader | ||
| mapi | ||
| mesa | ||
| panfrost | ||
| util | ||
| vulkan | ||
| meson.build | ||
| SConscript | ||