FREE(p);
}
-static void
-handle_invalid_batch_bo(struct ilo_3d_pipeline *p, bool unset)
-{
- if (p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_BATCH_BO) {
- if (ilo_dev_gen(p->dev) == ILO_GEN(6))
- p->state.has_gen6_wa_pipe_control = false;
-
- if (unset)
- p->invalidate_flags &= ~ILO_3D_PIPELINE_INVALIDATE_BATCH_BO;
- }
-}
-
-/**
- * Emit context states and 3DPRIMITIVE.
- */
-void
-ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p,
- const struct ilo_state_vector *vec)
-{
- handle_invalid_batch_bo(p, false);
- p->emit_draw(p, vec);
-}
-
-/**
- * Emit PIPE_CONTROL to flush all caches.
- */
-void
-ilo_3d_pipeline_emit_flush(struct ilo_3d_pipeline *p)
-{
- handle_invalid_batch_bo(p, true);
- p->emit_flush(p);
-}
-
-/**
- * Emit PIPE_CONTROL or MI_STORE_REGISTER_MEM to save register values.
- */
-void
-ilo_3d_pipeline_emit_query(struct ilo_3d_pipeline *p,
- struct ilo_query *q, uint32_t offset)
-{
- handle_invalid_batch_bo(p, true);
- p->emit_query(p, q, offset);
-}
-
-void
-ilo_3d_pipeline_emit_rectlist(struct ilo_3d_pipeline *p,
- const struct ilo_blitter *blitter)
-{
- handle_invalid_batch_bo(p, false);
- p->emit_rectlist(p, blitter);
-}
-
void
ilo_3d_pipeline_get_sample_position(struct ilo_3d_pipeline *p,
unsigned sample_count,
ilo_3d_pipeline_invalidate(struct ilo_3d_pipeline *p, uint32_t flags)
{
p->invalidate_flags |= flags;
+ p->state.has_gen6_wa_pipe_control = false;
}
/**
return pipeline->estimate_size(pipeline, action, arg);
}
-void
+/**
+ * Emit context states and 3DPRIMITIVE.
+ */
+static inline void
ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p,
- const struct ilo_state_vector *vec);
+ const struct ilo_state_vector *vec)
+{
+ p->emit_draw(p, vec);
+}
-void
-ilo_3d_pipeline_emit_flush(struct ilo_3d_pipeline *p);
+/**
+ * Emit PIPE_CONTROL to flush all caches.
+ */
+static inline void
+ilo_3d_pipeline_emit_flush(struct ilo_3d_pipeline *p)
+{
+ p->emit_flush(p);
+}
-void
+/**
+ * Emit PIPE_CONTROL or MI_STORE_REGISTER_MEM to save register values.
+ */
+static inline void
ilo_3d_pipeline_emit_query(struct ilo_3d_pipeline *p,
- struct ilo_query *q, uint32_t offset);
+ struct ilo_query *q, uint32_t offset)
+{
+ p->emit_query(p, q, offset);
+}
-void
+static inline void
ilo_3d_pipeline_emit_rectlist(struct ilo_3d_pipeline *p,
- const struct ilo_blitter *blitter);
+ const struct ilo_blitter *blitter)
+{
+ p->emit_rectlist(p, blitter);
+}
void
ilo_3d_pipeline_get_sample_position(struct ilo_3d_pipeline *p,
session->kernel_bo_changed = true;
session->prim_changed = true;
session->primitive_restart_changed = true;
- }
- else {
+ } else {
/*
* Any state that involves resources needs to be re-emitted when the
* batch bo changed. This is because we do not pin the resources and
* their offsets (or existence) may change between batch buffers.
- *
- * Since we messed around with ILO_3D_PIPELINE_INVALIDATE_BATCH_BO in
- * handle_invalid_batch_bo(), use ILO_3D_PIPELINE_INVALIDATE_STATE_BO as
- * a temporary workaround.
*/
session->batch_bo_changed =
- (p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_STATE_BO);
+ (p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_BATCH_BO);
session->state_bo_changed =
(p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_STATE_BO);