summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2013-12-24 04:56:25 +0000
committerDave Airlie <[email protected]>2014-02-05 10:49:37 +1000
commit5758a76d04aef90342e2b823c5020c6addda6d9c (patch)
tree3bd26b20fe8bc953b96c5e84f925415ba2efcbcd /src/gallium/drivers/r600
parenteeead9b8ed77804f228bd9ba434e26b5c12d73ed (diff)
r600g/sb: add MEM_RING support
Although we don't use SB on geom shaders, the VS copy shader will use it so we might as well implement MEM_RING support in sb. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_dump.cpp3
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_finalize.cpp2
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_parser.cpp6
-rw-r--r--src/gallium/drivers/r600/sb/sb_dump.cpp2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
index f79dff16ee3..1551e6d74f7 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp
@@ -150,6 +150,9 @@ void bc_dump::dump(cf_node& n) {
if ((n.bc.op_ptr->flags & CF_RAT) && (n.bc.type & 1)) {
s << ", @R" << n.bc.index_gpr << ".xyz";
}
+ if ((n.bc.op_ptr->flags & CF_MEM) && (n.bc.type & 1)) {
+ s << ", @R" << n.bc.index_gpr << ".x";
+ }
s << " ES:" << n.bc.elem_size;
diff --git a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
index d9654832259..54717f98a15 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp
@@ -695,7 +695,7 @@ void bc_finalizer::finalize_cf(cf_node* c) {
c->bc.rw_gpr = reg >= 0 ? reg : 0;
c->bc.comp_mask = mask;
- if ((flags & CF_RAT) && (c->bc.type & 1)) {
+ if (((flags & CF_RAT) || (!(flags & CF_STRM))) && (c->bc.type & 1)) {
reg = -1;
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index 24c4854225d..7181e27acf0 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -209,7 +209,7 @@ int bc_parser::decode_cf(unsigned &i, bool &eop) {
if (cf->bc.rw_rel)
gpr_reladdr = true;
assert(!cf->bc.rw_rel);
- } else if (flags & (CF_STRM | CF_RAT)) {
+ } else if (flags & CF_MEM) {
if (cf->bc.rw_rel)
gpr_reladdr = true;
assert(!cf->bc.rw_rel);
@@ -683,7 +683,7 @@ int bc_parser::prepare_ir() {
} while (1);
c->bc.end_of_program = eop;
- } else if (flags & (CF_STRM | CF_RAT)) {
+ } else if (flags & CF_MEM) {
unsigned burst_count = c->bc.burst_count;
unsigned eop = c->bc.end_of_program;
@@ -701,7 +701,7 @@ int bc_parser::prepare_ir() {
sh->get_gpr_value(true, c->bc.rw_gpr, s, false);
}
- if ((flags & CF_RAT) && (c->bc.type & 1)) { // indexed write
+ if (((flags & CF_RAT) || (!(flags & CF_STRM))) && (c->bc.type & 1)) { // indexed write
c->src.resize(8);
for(int s = 0; s < 3; ++s) {
c->src[4 + s] =
diff --git a/src/gallium/drivers/r600/sb/sb_dump.cpp b/src/gallium/drivers/r600/sb/sb_dump.cpp
index 7e317abe7a7..b2130a48fa6 100644
--- a/src/gallium/drivers/r600/sb/sb_dump.cpp
+++ b/src/gallium/drivers/r600/sb/sb_dump.cpp
@@ -349,7 +349,7 @@ void dump::dump_op(node &n, const char *name) {
static const char *exp_type[] = {"PIXEL", "POS ", "PARAM"};
sblog << " " << exp_type[c->bc.type] << " " << c->bc.array_base;
has_dst = false;
- } else if (c->bc.op_ptr->flags & CF_STRM) {
+ } else if (c->bc.op_ptr->flags & (CF_MEM)) {
static const char *exp_type[] = {"WRITE", "WRITE_IND", "WRITE_ACK",
"WRITE_IND_ACK"};
sblog << " " << exp_type[c->bc.type] << " " << c->bc.array_base