glsl: don't inline intrinsics for mediump
authorRob Clark <robdclark@chromium.org>
Mon, 20 Jul 2020 17:36:13 +0000 (10:36 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 22:04:47 +0000 (22:04 +0000)
They have an empty fxn body, trying to handle them results in the
intrinsic call being expanded into a no-op.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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 805b8d975a7da8a7da8f2583f81a6a9bc638f9a1..dcf632983f96ea2690df75ff4515973bcaa1a88c 100644 (file)
@@ -883,6 +883,7 @@ find_precision_visitor::visit_enter(ir_call *ir)
     */
 
    if (!ir->callee->is_builtin() ||
+       ir->callee->is_intrinsic() ||
        return_var == NULL ||
        (return_var->data.precision != GLSL_PRECISION_MEDIUM &&
         return_var->data.precision != GLSL_PRECISION_LOW))