const unsigned dc_flush =
brw->gen >= 7 ? PIPE_CONTROL_DATA_CACHE_FLUSH : 0;
- if (brw->gen == 6) {
- /* Hardware workaround: SNB B-Spec says:
- *
- * Before a PIPE_CONTROL with Write Cache Flush Enable = 1, a
- * PIPE_CONTROL with any non-zero post-sync-op is required.
- */
- brw_emit_post_sync_nonzero_flush(brw);
- }
-
brw_emit_pipe_control_flush(brw,
PIPE_CONTROL_RENDER_TARGET_FLUSH |
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
OUT_BATCH(0);
ADVANCE_BATCH();
} else if (brw->gen >= 6) {
+ if (brw->gen == 6 &&
+ (flags & PIPE_CONTROL_RENDER_TARGET_FLUSH)) {
+ /* Hardware workaround: SNB B-Spec says:
+ *
+ * [Dev-SNB{W/A}]: Before a PIPE_CONTROL with Write Cache Flush
+ * Enable = 1, a PIPE_CONTROL with any non-zero post-sync-op is
+ * required.
+ */
+ brw_emit_post_sync_nonzero_flush(brw);
+ }
+
flags |= gen7_cs_stall_every_four_pipe_controls(brw, flags);
BEGIN_BATCH(5);
PIPE_CONTROL_VF_CACHE_INVALIDATE |
PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |
PIPE_CONTROL_CS_STALL;
-
- if (brw->gen == 6) {
- /* Hardware workaround: SNB B-Spec says:
- *
- * [Dev-SNB{W/A}]: Before a PIPE_CONTROL with Write Cache
- * Flush Enable =1, a PIPE_CONTROL with any non-zero
- * post-sync-op is required.
- */
- brw_emit_post_sync_nonzero_flush(brw);
- }
}
brw_emit_pipe_control_flush(brw, flags);
}
return;
if (brw->gen >= 6) {
- if (brw->gen == 6) {
- /* [Dev-SNB{W/A}]: Before a PIPE_CONTROL with Write Cache
- * Flush Enable = 1, a PIPE_CONTROL with any non-zero
- * post-sync-op is required.
- */
- brw_emit_post_sync_nonzero_flush(brw);
- }
-
brw_emit_pipe_control_flush(brw,
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
PIPE_CONTROL_RENDER_TARGET_FLUSH |
struct brw_context *brw = brw_context(ctx);
if (brw->gen >= 6) {
- if (brw->gen == 6) {
- /* [Dev-SNB{W/A}]: Before a PIPE_CONTROL with Write Cache
- * Flush Enable = 1, a PIPE_CONTROL with any non-zero
- * post-sync-op is required.
- */
- brw_emit_post_sync_nonzero_flush(brw);
- }
-
brw_emit_pipe_control_flush(brw,
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
PIPE_CONTROL_RENDER_TARGET_FLUSH |