summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-02-22 18:42:33 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-02-22 18:45:40 -0500
commit4212dbae1cbbc01454ab660f08513f0910cef37b (patch)
tree007bee0564088f7ab178b8adf1d627bc6634dab6
parenta650092fd6e5a78bc04832c485361c11f7200e80 (diff)
r600g: fixup PS_PARTIAL_FLUSH flag handling for cayman
So we don't emit it twice if we ever use the flag on cayman. Note: this is a candidate for the 9.1 branch. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8b5acad0e985215b46fc1cfc8ad87c8771a11a3a)
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 9f0a1f3b9ff..9091ec02a54 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -622,11 +622,6 @@ void r600_flush_emit(struct r600_context *rctx)
return;
}
- if (rctx->flags & R600_CONTEXT_PS_PARTIAL_FLUSH) {
- cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
- cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
- }
-
if (rctx->flags & R600_CONTEXT_WAIT_3D_IDLE) {
wait_until |= S_008040_WAIT_3D_IDLE(1);
}
@@ -638,11 +633,15 @@ void r600_flush_emit(struct r600_context *rctx)
/* Use of WAIT_UNTIL is deprecated on Cayman+ */
if (rctx->family >= CHIP_CAYMAN) {
/* emit a PS partial flush on Cayman/TN */
- cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
- cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
+ rctx->flags |= R600_CONTEXT_PS_PARTIAL_FLUSH;
}
}
+ if (rctx->flags & R600_CONTEXT_PS_PARTIAL_FLUSH) {
+ cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
+ cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
+ }
+
if (rctx->chip_class >= R700 &&
(rctx->flags & R600_CONTEXT_FLUSH_AND_INV_CB_META)) {
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);