freedreno/ir3: add assert
authorRob Clark <robdclark@chromium.org>
Fri, 28 Feb 2020 00:13:01 +0000 (16:13 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 16:53:41 +0000 (16:53 +0000)
Catch problems earlier when inputs are not setup correctly.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>

src/freedreno/ir3/ir3_compiler_nir.c

index a8b691a15d744bae3c9bf7fd5a0bbad1f8b8280b..01f0985da62adbcd0a6b226ecb40bdcf62c81b90 100644 (file)
@@ -1540,6 +1540,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr)
                                         * nir_variable to figure out what it is.
                                         */
                                        dst[i] = ctx->inputs[inloc];
+                                       compile_assert(ctx, dst[i]);
                                }
                        }
                } else {