summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_render.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-24 15:24:25 +0800
committerChia-I Wu <[email protected]>2014-09-26 21:15:55 +0800
commite3451552d23b7b656bafde5c4cf63e86b87137f0 (patch)
treeb74b9f3694e23cf3d33a5123b3a19ef6aa20060e /src/gallium/drivers/ilo/ilo_render.h
parentce2bda300d00bf4fa92b287ff257f7c5fd17e81e (diff)
ilo: simplify ilo_render invalidation
ilo_render is based on ilo_builder. We should only care if the builder buffers are invalidated, or if the hardware context is invalidated. Replace ilo_render_invalidate() with flags by ilo_render_invalidate_builder() and ilo_render_invalidate_hw(). Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_render.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_render.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/gallium/drivers/ilo/ilo_render.h b/src/gallium/drivers/ilo/ilo_render.h
index a5f1c1b80cd..1334936194b 100644
--- a/src/gallium/drivers/ilo/ilo_render.h
+++ b/src/gallium/drivers/ilo/ilo_render.h
@@ -37,15 +37,6 @@ struct ilo_cp;
struct ilo_query;
struct ilo_state_vector;
-enum ilo_render_invalidate_flags {
- ILO_RENDER_INVALIDATE_HW = 1 << 0,
- ILO_RENDER_INVALIDATE_BATCH_BO = 1 << 1,
- ILO_RENDER_INVALIDATE_STATE_BO = 1 << 2,
- ILO_RENDER_INVALIDATE_KERNEL_BO = 1 << 3,
-
- ILO_RENDER_INVALIDATE_ALL = 0xffffffff,
-};
-
enum ilo_render_action {
ILO_RENDER_DRAW,
ILO_RENDER_FLUSH,
@@ -60,8 +51,6 @@ struct ilo_render {
const struct ilo_dev_info *dev;
struct ilo_builder *builder;
- uint32_t invalidate_flags;
-
struct intel_bo *workaround_bo;
uint32_t packed_sample_position_1x;
@@ -83,6 +72,17 @@ struct ilo_render {
void (*emit_rectlist)(struct ilo_render *render,
const struct ilo_blitter *blitter);
+ bool hw_ctx_changed;
+
+ /*
+ * 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.
+ */
+ bool batch_bo_changed;
+ bool state_bo_changed;
+ bool instruction_bo_changed;
+
/**
* HW states.
*/
@@ -151,16 +151,6 @@ ilo_render_create(struct ilo_builder *builder);
void
ilo_render_destroy(struct ilo_render *render);
-
-static inline void
-ilo_render_invalidate(struct ilo_render *render, uint32_t flags)
-{
- render->invalidate_flags |= flags;
-
- /* Kernel flushes everything. Shouldn't we set all bits here? */
- render->state.current_pipe_control_dw1 = 0;
-}
-
/**
* Estimate the size of an action.
*/
@@ -214,4 +204,10 @@ ilo_render_get_sample_position(const struct ilo_render *render,
unsigned sample_index,
float *x, float *y);
+void
+ilo_render_invalidate_hw(struct ilo_render *render);
+
+void
+ilo_render_invalidate_builder(struct ilo_render *render);
+
#endif /* ILO_RENDER_H */