r600/cayman: fix fragcood loading recip generation.
authorDave Airlie <airlied@redhat.com>
Thu, 1 Mar 2018 03:38:32 +0000 (03:38 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 2 Mar 2018 00:33:18 +0000 (00:33 +0000)
This fixes some hangs seen where the recip_ieee opcodes would
end up split across the wrong slots.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 46eeb9021f5b0cc6f92a157a2baf0f2ee5e37212..4b44f6614190b2062dfa087599150d0ea1b75aeb 100644 (file)
@@ -3768,7 +3768,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
                                alu.dst.sel = shader->input[ctx.fragcoord_input].gpr;
                                alu.dst.chan = j;
                                alu.dst.write = (j == 3);
-                               alu.last = 1;
+                               alu.last = (j == 3);
                                if ((r = r600_bytecode_add_alu(ctx.bc, &alu)))
                                        return r;
                        }