<div dir="ltr">Pushed, thanks. The transform feedback test still doesn't pass, but at least the hardlocks are gone.<br><br>Marek<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 7, 2013 at 6:29 PM, Martin Andersson <span dir="ltr"><<a href="mailto:g02maran@gmail.com" target="_blank">g02maran@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If there are no objections or comments on this, it would be nice if<br>
someone could commit it.<br>
<span class="HOEnZb"><font color="#888888"><br>
//Martin<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Apr 2, 2013 at 10:43 PM, Martin Andersson <<a href="mailto:g02maran@gmail.com">g02maran@gmail.com</a>> wrote:<br>
> The multiplication part of tgsi_umad did not work on Cayman, because it did<br>
> not populate the correct vector slots.<br>
> ---<br>
> src/gallium/drivers/r600/r600_shader.c | 45 ++++++++++++++++++++++++----------<br>
> 1 file changed, 32 insertions(+), 13 deletions(-)<br>
><br>
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c<br>
> index 82885d1..6c4cc8f 100644<br>
> --- a/src/gallium/drivers/r600/r600_shader.c<br>
> +++ b/src/gallium/drivers/r600/r600_shader.c<br>
> @@ -5840,7 +5840,7 @@ static int tgsi_umad(struct r600_shader_ctx *ctx)<br>
> {<br>
> struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;<br>
> struct r600_bytecode_alu alu;<br>
> - int i, j, r;<br>
> + int i, j, k, r;<br>
> int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);<br>
><br>
> /* src0 * src1 */<br>
> @@ -5848,21 +5848,40 @@ static int tgsi_umad(struct r600_shader_ctx *ctx)<br>
> if (!(inst->Dst[0].Register.WriteMask & (1 << i)))<br>
> continue;<br>
><br>
> - memset(&alu, 0, sizeof(struct r600_bytecode_alu));<br>
> + if (ctx->bc->chip_class == CAYMAN) {<br>
> + for (j = 0 ; j < 4; j++) {<br>
> + memset(&alu, 0, sizeof(struct r600_bytecode_alu));<br>
><br>
> - alu.dst.chan = i;<br>
> - alu.dst.sel = ctx->temp_reg;<br>
> - alu.dst.write = 1;<br>
> + alu.op = ALU_OP2_MULLO_UINT;<br>
> + for (k = 0; k < inst->Instruction.NumSrcRegs; k++) {<br>
> + r600_bytecode_src(&alu.src[k], &ctx->src[k], i);<br>
> + }<br>
> + tgsi_dst(ctx, &inst->Dst[0], j, &alu.dst);<br>
> + alu.dst.sel = ctx->temp_reg;<br>
> + alu.dst.write = (j == i);<br>
> + if (j == 3)<br>
> + alu.last = 1;<br>
> + r = r600_bytecode_add_alu(ctx->bc, &alu);<br>
> + if (r)<br>
> + return r;<br>
> + }<br>
> + } else {<br>
> + memset(&alu, 0, sizeof(struct r600_bytecode_alu));<br>
><br>
> - alu.op = ALU_OP2_MULLO_UINT;<br>
> - for (j = 0; j < 2; j++) {<br>
> - r600_bytecode_src(&alu.src[j], &ctx->src[j], i);<br>
> - }<br>
> + alu.dst.chan = i;<br>
> + alu.dst.sel = ctx->temp_reg;<br>
> + alu.dst.write = 1;<br>
><br>
> - alu.last = 1;<br>
> - r = r600_bytecode_add_alu(ctx->bc, &alu);<br>
> - if (r)<br>
> - return r;<br>
> + alu.op = ALU_OP2_MULLO_UINT;<br>
> + for (j = 0; j < 2; j++) {<br>
> + r600_bytecode_src(&alu.src[j], &ctx->src[j], i);<br>
> + }<br>
> +<br>
> + alu.last = 1;<br>
> + r = r600_bytecode_add_alu(ctx->bc, &alu);<br>
> + if (r)<br>
> + return r;<br>
> + }<br>
> }<br>
><br>
><br>
> --<br>
> 1.8.2<br>
><br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>