Mesa (main): r300: expose PIPE_CAP_LEGACY_MATH_RULES

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 14 06:12:24 UTC 2022


Module: Mesa
Branch: main
Commit: fa645861af6b357aef2e8ae7923a1143da4ff71f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa645861af6b357aef2e8ae7923a1143da4ff71f

Author: Pavel Ondračka <pavel.ondracka at gmail.com>
Date:   Fri May 20 08:32:31 2022 +0200

r300: expose PIPE_CAP_LEGACY_MATH_RULES

We are already doing the 0*anything = 0 by default and we are also
using the DX versions of math ops like RCP. It looks like R300 and
R400 can't do IEEE math anyway (but its hard to tell without docs).
For R500 we can do IEEE math, but testing showed that some apps
are dependent on the DX behavior, so considering we only advertise
GLSL 1.20 where this is left ot the driver, just keep the curent
status and expose PIPE_CAP_LEGACY_MATH_RULES so that nine can stop
emiting math workarounds.

Also fixes two Xnine tests.

Signed-off-by: Pavel Ondračka <pavel.ondracka at gmail.com>
Reviewed-by: Filip Gawin <filip at gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17007>

---

 src/gallium/drivers/r300/r300_screen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 6c7f05d5860..ffcaf649141 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -144,6 +144,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
         case PIPE_CAP_CLIP_HALFZ:
         case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
+        case PIPE_CAP_LEGACY_MATH_RULES:
             return 1;
 
         case PIPE_CAP_TEXTURE_TRANSFER_MODES:



More information about the mesa-commit mailing list