Commit 2fe39b46 authored by Vadim Girlin's avatar Vadim Girlin Committed by Dave Airlie

r600g: fix LIT to handle src==dst properly

Current LIT implementation uses dst components for storing temp
results, possibly overwriting still needed values (depends on the
This patch uses temp reg for one of such cases (found in etqw) and
fixes "LIT R.z, R.xyzz".

Tested on evergreen. Fixes some etqw-demo rendering glitches when
"Lighting" is set to "High" in the settings.
Signed-off-by: Vadim Girlin's avatarVadim Girlin <>
Signed-off-by: default avatarDave Airlie <>
parent 8ab1c532
......@@ -1366,7 +1366,9 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
r600_bc_src(&alu.src[0], &ctx->src[0], 1);
tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 2;
alu.dst.write = 1;
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment