r600/sb: introduce special register values for lds support.

For LDS read/write ordering we use the LDS_RW value, reads
will wait on previous writes.
For LDS read/read from LDS queue ordering we use the LDS_OQ
values, we define two for now, though initially we'll just
support OQA.

Also add the check for the lds oq values

Acked-By: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2018-01-10 03:52:50 +00:00
parent 2f2cef385f
commit 09c1c13c44
3 changed files with 33 additions and 1 deletions
+4
View File
@@ -722,6 +722,10 @@ public:
return ((sel >= 128 && sel < 192) || (sel >= 256 && sel < 320));
}
bool is_lds_oq(unsigned sel) {
return (sel >= 0xdb && sel <= 0xde);
}
const char * get_hw_class_name();
const char * get_hw_chip_name();
+26 -1
View File
@@ -42,7 +42,10 @@ enum special_regs {
SV_EXEC_MASK,
SV_AR_INDEX,
SV_VALID_MASK,
SV_GEOMETRY_EMIT
SV_GEOMETRY_EMIT,
SV_LDS_RW,
SV_LDS_OQA,
SV_LDS_OQB,
};
class node;
@@ -495,6 +498,12 @@ public:
bool is_geometry_emit() {
return is_special_reg() && select == sel_chan(SV_GEOMETRY_EMIT, 0);
}
bool is_lds_access() {
return is_special_reg() && select == sel_chan(SV_LDS_RW, 0);
}
bool is_lds_oq() {
return is_special_reg() && (select == sel_chan(SV_LDS_OQA, 0) || select == sel_chan(SV_LDS_OQB, 0));
}
node* any_def() {
assert(!(def && adef));
@@ -833,6 +842,22 @@ public:
return vec_uses_ar(dst) || vec_uses_ar(src);
}
bool vec_uses_lds_oq(vvec &vv) {
for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) {
value *v = *I;
if (v && v->is_lds_oq())
return true;
}
return false;
}
bool consumes_lds_oq() {
return vec_uses_lds_oq(src);
}
bool produces_lds_oq() {
return vec_uses_lds_oq(dst);
}
region_node* get_parent_region();
@@ -56,6 +56,9 @@ sb_ostream& operator << (sb_ostream &o, value &v) {
case SV_EXEC_MASK: o << "EM"; break;
case SV_VALID_MASK: o << "VM"; break;
case SV_GEOMETRY_EMIT: o << "GEOMETRY_EMIT"; break;
case SV_LDS_RW: o << "LDS_RW"; break;
case SV_LDS_OQA: o << "LDS_OQA"; break;
case SV_LDS_OQB: o << "LDS_OQB"; break;
default: o << "???specialreg"; break;
}
break;