pan/midgard: Use a reg temporary for mutiple writes
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 16 Dec 2019 21:53:52 +0000 (16:53 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 17 Dec 2019 17:42:57 +0000 (17:42 +0000)
Bug in texelfetch implementation from inspection.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3125>

src/panfrost/midgard/midgard_compile.c

index 58d7902577a56a243fa757589baebbe3e356882b..01729304d425179e3088913b52cf430c7382e716 100644 (file)
@@ -1744,7 +1744,7 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
                         if (midgard_texop == TEXTURE_OP_TEXEL_FETCH) {
                                 unsigned old_index = index;
 
-                                index = make_compiler_temp(ctx);
+                                index = make_compiler_temp_reg(ctx);
 
                                 /* mov index, old_index */
                                 midgard_instruction mov = v_mov(old_index, index);