Am Freitag, den 08.12.2017, 16:30 +1000 schrieb Dave Airlie: > [snip] > > So I haven't commited these yet, because I wanted to see if I could > get sb to work. Well, it was very much work in progress, I didn't expect it to be committed as is anyway.
> > https://cgit.freedesktop.org/~airlied/mesa/log/?h=r600-sb-lds-wip > > is my non functional attempt, so far, biut it gpu hangs on the nop > shader. I've played aound it a bit and added some hacks to make it not hang, i.e. sb scheduls calls into any slot, but LDS read/write should go only into SLOT_X, and not splitting up the fetch seemed to be important (patch attached). However, gcm moves around the LSD_OQ* loads changing the order without changing the order of the according LDS_READ_RET calls. At least for this the nop shader still fails. I tried to persuade the optimizer to not reorder these move instructions by adding a "use" to the dst-value of a node that reads from a LDS_OQ to the next node that reads from the same queue, but to no avail. I guess I didn't figure out how to count these extra uses properly when the instructuions are scheduled. Best, Gert
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 5236e7110c..4ec7900398 100644 diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h index 3a3bae9d44..b35671bf0f 100644 --- a/src/gallium/drivers/r600/sb/sb_bc.h +++ b/src/gallium/drivers/r600/sb/sb_bc.h @@ -711,6 +711,9 @@ public: mask = 0x0F; if (!is_cayman() && (slot_flags & AF_S)) mask |= 0x10; + /* Force LDS_IDX ops into SLOT_X */ + if (op_ptr->opcode[0] == -1 && ((op_ptr->opcode[1] & 0xFF) == 0x11)) + mask = 0x01; return mask; } diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp index bde4bde8fe..4f7dc2dc51 100644 --- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp +++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp @@ -388,7 +389,7 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) { n->flags |= NF_DONT_HOIST | NF_DONT_MOVE | NF_DONT_KILL | NF_SCHEDULE_EARLY; } else if (flags & AF_LDS) { - n->flags |= NF_DONT_MOVE | NF_DONT_HOIST | NF_SCHEDULE_EARLY; + n->flags |= NF_DONT_MOVE | NF_DONT_HOIST; /* all non-read operations have side effects */ if (n->bc.op != LDS_OP2_LDS_READ2_RET && n->bc.op != LDS_OP1_LDS_READ_REL_RET && @@ -523,6 +524,7 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) { n->src[s] = sh->get_special_value(SV_LDS_OQB); break; } + n->flags |= NF_DONT_MOVE; } else { switch (src.sel) { case ALU_SRC_0:
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev