aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_render.c
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.c
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.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_render.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_render.c b/src/gallium/drivers/ilo/ilo_render.c
index 4b85f8cbeb3..3b3b9cae7ae 100644
--- a/src/gallium/drivers/ilo/ilo_render.c
+++ b/src/gallium/drivers/ilo/ilo_render.c
@@ -88,8 +88,6 @@ ilo_render_create(struct ilo_builder *builder)
break;
}
- render->invalidate_flags = ILO_RENDER_INVALIDATE_ALL;
-
render->workaround_bo = intel_winsys_alloc_buffer(builder->winsys,
"PIPE_CONTROL workaround", 4096, false);
if (!render->workaround_bo) {
@@ -117,6 +115,9 @@ ilo_render_create(struct ilo_builder *builder)
sample_position_8x[4 + i].y << (8 * i);
}
+ ilo_render_invalidate_hw(render);
+ ilo_render_invalidate_builder(render);
+
return render;
}
@@ -161,3 +162,20 @@ ilo_render_get_sample_position(const struct ilo_render *render,
*x = (float) pos[sample_index].x / 16.0f;
*y = (float) pos[sample_index].y / 16.0f;
}
+
+void
+ilo_render_invalidate_hw(struct ilo_render *render)
+{
+ render->hw_ctx_changed = true;
+}
+
+void
+ilo_render_invalidate_builder(struct ilo_render *render)
+{
+ render->batch_bo_changed = true;
+ render->state_bo_changed = true;
+ render->instruction_bo_changed = true;
+
+ /* Kernel flushes everything. Shouldn't we set all bits here? */
+ render->state.current_pipe_control_dw1 = 0;
+}