summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/sb
diff options
context:
space:
mode:
authorGlenn Kennard <[email protected]>2014-10-15 17:12:16 +0200
committerMarek Olšák <[email protected]>2014-10-28 23:20:45 +0100
commit7b1c0cbc90d456384b0950ad21faa3c61a6b43ff (patch)
tree13e81fc5dcfcf58f68accc686e907588ec29275f /src/gallium/drivers/r600/sb
parent444c8c2f287d6553b7d9c5cdf721dcb7624e01a9 (diff)
r600g: Implement sm5 UBO/sampler indexing
Caveat: Shaders using UBO/sampler indexing will not be optimized by SB, due to SB not currently supporting the necessary CF_INDEX_[01] index registers. Signed-off-by: Glenn Kennard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/sb')
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_dump.cpp8
-rw-r--r--src/gallium/drivers/r600/sb/sb_sched.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
index 1551e6d74f7..6f6a57e2647 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
@@ -165,13 +165,14 @@ void bc_dump::dump(cf_node& n) {
s << " @" << (n.bc.addr << 1);
if (n.bc.op_ptr->flags & CF_ALU) {
+ static const char *index_mode[] = {"", " CF_INDEX_0", " CF_INDEX_1"};
for (int k = 0; k < 4; ++k) {
bc_kcache &kc = n.bc.kc[k];
if (kc.mode) {
s << " KC" << k << "[CB" << kc.bank << ":" <<
(kc.addr << 4) << "-" <<
- (((kc.addr + kc.mode) << 4) - 1) << "]";
+ (((kc.addr + kc.mode) << 4) - 1) << index_mode[kc.index_mode] << "]";
}
}
}
@@ -445,6 +446,11 @@ void bc_dump::dump(fetch_node& n) {
s << " MFC:" << n.bc.mega_fetch_count;
if (n.bc.fetch_whole_quad)
s << " FWQ";
+ if (ctx.is_egcm() && n.bc.resource_index_mode)
+ s << " RIM:SQ_CF_INDEX_" << n.bc.resource_index_mode;
+ if (ctx.is_egcm() && n.bc.resource_index_mode)
+ s << " SID:SQ_CF_INDEX_" << n.bc.sampler_index_mode;
+
s << " UCF:" << n.bc.use_const_fields
<< " FMT(DTA:" << n.bc.data_format
<< " NUM:" << n.bc.num_format_all
diff --git a/src/gallium/drivers/r600/sb/sb_sched.h b/src/gallium/drivers/r600/sb/sb_sched.h
index a74484f50b3..87c45867e16 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.h
+++ b/src/gallium/drivers/r600/sb/sb_sched.h
@@ -32,6 +32,8 @@ namespace r600_sb {
typedef sb_map<node*, unsigned> uc_map;
// resource trackers for scheduler
+// rp = read port
+// uc = use count
typedef sb_set<unsigned> kc_lines;