Mesa (master): glsl: don't lower atomic functions to mediump

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 5 22:23:14 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Jul 23 00:13:35 2020 -0400

glsl: don't lower atomic functions to mediump

Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>

---

 src/compiler/glsl/lower_precision.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/lower_precision.cpp b/src/compiler/glsl/lower_precision.cpp
index dcf632983f9..97a91f8c440 100644
--- a/src/compiler/glsl/lower_precision.cpp
+++ b/src/compiler/glsl/lower_precision.cpp
@@ -506,7 +506,9 @@ is_lowerable_builtin(ir_call *ir,
         */
        !strcmp(ir->callee_name(), "packHalf2x16") ||
        !strcmp(ir->callee_name(), "packUnorm4x8") ||
-       !strcmp(ir->callee_name(), "packSnorm4x8"))
+       !strcmp(ir->callee_name(), "packSnorm4x8") ||
+       /* Atomic functions are not lowered. */
+       strstr(ir->callee_name(), "atomic") == ir->callee_name())
       return false;
 
    assert(ir->callee->return_precision == GLSL_PRECISION_NONE);



More information about the mesa-commit mailing list