glsl: don't lower atomic functions to mediump
authorMarek Olšák <marek.olsak@amd.com>
Thu, 23 Jul 2020 04:13:35 +0000 (00:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 22:04:47 +0000 (22:04 +0000)
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>

src/compiler/glsl/lower_precision.cpp

index dcf6329..97a91f8 100644 (file)
@@ -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);