* IN THE SOFTWARE.
*/
+#include "intel_batchbuffer.h"
#include "intel_fbo.h"
#include "brw_blorp.h"
void
brw_blorp_exec(struct intel_context *intel, const brw_blorp_params *params)
{
+ struct brw_context *brw = brw_context(&intel->ctx);
+
switch (intel->gen) {
case 6:
gen6_blorp_exec(intel, params);
assert(false);
break;
}
+
+ if (unlikely(intel->always_flush_batch))
+ intel_batchbuffer_flush(intel);
+
+ /* We've smashed all state compared to what the normal 3D pipeline
+ * rendering tracks for GL.
+ */
+ brw->state.dirty.brw = ~0;
+ brw->state.dirty.cache = ~0;
+ brw->state_batch_count = 0;
+ intel->batch.need_workaround_flush = true;
+
+ /* Flush the sampler cache so any texturing from the destination is
+ * coherent.
+ */
+ intel_batchbuffer_emit_mi_flush(intel);
}
brw_hiz_op_params::brw_hiz_op_params(struct intel_mipmap_tree *mt,
gen6_blorp_emit_clear_params(brw, params);
gen6_blorp_emit_drawing_rectangle(brw, params);
gen6_blorp_emit_primitive(brw, params);
-
- /* See comments above at first invocation of intel_flush() in
- * gen6_blorp_emit_batch_head().
- */
- intel_flush(ctx);
-
- /* Be safe. */
- brw->state.dirty.brw = ~0;
- brw->state.dirty.cache = ~0;
}
gen7_blorp_emit_clear_params(brw, params);
gen6_blorp_emit_drawing_rectangle(brw, params);
gen7_blorp_emit_primitive(brw, params);
-
- /* See comments above at first invocation of intel_flush() in
- * gen6_blorp_emit_batch_head().
- */
- intel_flush(ctx);
-
- /* Be safe. */
- brw->state.dirty.brw = ~0;
- brw->state.dirty.cache = ~0;
}