broadcom/compiler: payload_w is loaded on rf3 for v71
And in general rf0 is now used for other needs. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
This commit is contained in:

committed by
Marge Bot

parent
edfc36817a
commit
5a035af931
@@ -4311,7 +4311,11 @@ nir_to_vir(struct v3d_compile *c)
|
|||||||
{
|
{
|
||||||
switch (c->s->info.stage) {
|
switch (c->s->info.stage) {
|
||||||
case MESA_SHADER_FRAGMENT:
|
case MESA_SHADER_FRAGMENT:
|
||||||
c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 0));
|
if (c->devinfo->ver < 71)
|
||||||
|
c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 0));
|
||||||
|
else
|
||||||
|
c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 3));
|
||||||
|
|
||||||
c->payload_w_centroid = vir_MOV(c, vir_reg(QFILE_REG, 1));
|
c->payload_w_centroid = vir_MOV(c, vir_reg(QFILE_REG, 1));
|
||||||
c->payload_z = vir_MOV(c, vir_reg(QFILE_REG, 2));
|
c->payload_z = vir_MOV(c, vir_reg(QFILE_REG, 2));
|
||||||
|
|
||||||
|
@@ -1034,6 +1034,11 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,
|
|||||||
if (inst->src[0].file == QFILE_REG) {
|
if (inst->src[0].file == QFILE_REG) {
|
||||||
switch (inst->src[0].index) {
|
switch (inst->src[0].index) {
|
||||||
case 0:
|
case 0:
|
||||||
|
/* V3D 7.x doesn't use rf0 for thread payload */
|
||||||
|
if (c->devinfo->ver >= 71)
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 3: {
|
case 3: {
|
||||||
@@ -1163,7 +1168,6 @@ v3d_register_allocate(struct v3d_compile *c)
|
|||||||
vir_for_each_inst_inorder(inst, c) {
|
vir_for_each_inst_inorder(inst, c) {
|
||||||
inst->ip = ip++;
|
inst->ip = ip++;
|
||||||
update_graph_and_reg_classes_for_inst(c, acc_nodes, inst);
|
update_graph_and_reg_classes_for_inst(c, acc_nodes, inst);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the register classes for all our temporaries in the graph */
|
/* Set the register classes for all our temporaries in the graph */
|
||||||
|
Reference in New Issue
Block a user