unsigned dst_reg, unsigned mask)
{
struct r600_bytecode_alu alu;
- int r, i;
+ int r, i, lasti;
if ((ctx->bc->cf_last->ndw>>1) >= 0x60)
ctx->bc->force_add_cf = 1;
- for (i = 1; i < 4; i++) {
+ lasti = tgsi_last_instruction(mask);
+ for (i = 1; i <= lasti; i++) {
if (!(mask & (1 << i)))
continue;
if (r)
return r;
}
- for (i = 0; i < 4; i++) {
- if (! (mask & (1 << i)))
+ for (i = 0; i <= lasti; i++) {
+ if (!(mask & (1 << i)))
continue;
/* emit an LDS_READ_RET */
if (r)
return r;
}
- for (i = 0; i < 4; i++) {
- if (! (mask & (1 << i)))
+ for (i = 0; i <= lasti; i++) {
+ if (!(mask & (1 << i)))
continue;
+
/* then read from LDS_OQ_A_POP */
memset(&alu, 0, sizeof(alu));