Mesa (master): r600: enable support for 64 bit DIVMOD when NIR is used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 12 19:37:15 UTC 2021


Module: Mesa
Branch: master
Commit: 33362e0df52be7f835f109c818dbf9615e19c91c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=33362e0df52be7f835f109c818dbf9615e19c91c

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Mon Dec  7 16:45:54 2020 +0100

r600: enable support for 64 bit DIVMOD when NIR is used

The glsl lowering seems to be broken, but the nir lowering pass handles
this correctly.

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

---

 src/gallium/drivers/r600/r600_pipe.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 297f80c4e51..71b603cff54 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -414,6 +414,11 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 		    rscreen->b.family == CHIP_HEMLOCK)
 			return 1;
 		return 0;
+        case PIPE_CAP_INT64_DIVMOD:
+           /* it is actually not supported, but the nir lowering hdanles this corectly wheras
+            * the glsl lowering path seems to not initialize the buildins correctly.
+            */
+           return is_nir_enabled(&rscreen->b);
 	case PIPE_CAP_CULL_DISTANCE:
 		return 1;
 



More information about the mesa-commit mailing list