summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-02-23 20:14:31 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2015-12-04 16:36:44 +0000
commit67be605b96612b9944142f002f9d80b6703c797a (patch)
treec8ffa07ace1e78cfee6f9f839ef43d89e237d2d5 /src/gallium
parentbe20f1d7c1f76746cedb146ee56d995c30310f6a (diff)
r600: do SQ flush ES ring rolling workaround
Need to insert a SQ_NON_EVENT when ever geometry shaders are enabled. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit b63944e8b9177d231b3789bf84ea9e67b9629905)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h2
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c6
-rw-r--r--src/gallium/drivers/r600/r600d.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index bbb55adef8..71a435f870 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -59,7 +59,7 @@
/* the number of CS dwords for flushing and drawing */
#define R600_MAX_FLUSH_CS_DWORDS 16
-#define R600_MAX_DRAW_CS_DWORDS 47
+#define R600_MAX_DRAW_CS_DWORDS 49
#define R600_TRACE_CS_DWORDS 7
#define R600_MAX_USER_CONST_BUFFERS 13
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index d629194ca6..722ab177bf 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1770,6 +1770,12 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info
(info.count_from_stream_output ? S_0287F0_USE_OPAQUE(1) : 0);
}
+ /* ES ring rolling over at EOP - workaround */
+ if (rctx->b.chip_class == R600) {
+ cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
+ cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_SQ_NON_EVENT);
+ }
+
if (rctx->screen->b.trace_bo) {
r600_trace_emit(rctx);
}
diff --git a/src/gallium/drivers/r600/r600d.h b/src/gallium/drivers/r600/r600d.h
index 53f5ad6db6..d50d9cc483 100644
--- a/src/gallium/drivers/r600/r600d.h
+++ b/src/gallium/drivers/r600/r600d.h
@@ -130,6 +130,7 @@
#define EVENT_TYPE_SAMPLE_STREAMOUTSTATS 0x20
#define EVENT_TYPE_FLUSH_AND_INV_DB_META 0x2c /* supported on r700+ */
#define EVENT_TYPE_VGT_FLUSH 0x24
+#define EVENT_TYPE_SQ_NON_EVENT 0x26
#define EVENT_TYPE_FLUSH_AND_INV_CB_META 46 /* supported on r700+ */
#define EVENT_TYPE(x) ((x) << 0)
#define EVENT_INDEX(x) ((x) << 8)