summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_context.h
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2011-02-25 23:40:27 +0100
committerDaniel Vetter <[email protected]>2011-02-27 22:10:46 +0100
commitd42c9433b0a3d9b3a198261d8037ce0d4595452d (patch)
tree663b65b395504391a908e828c562bbc41ca14e5b /src/gallium/drivers/i915/i915_context.h
parentf90fa55347c641cd0bcdde121909045f0dedbd66 (diff)
i915g: implement cache flushing
With an extremely dumb strategy. But it's the same i915c employs. Also improve the hw_atom code slightly by statically specifying the required batch space. For extremely variably stuff (shaders, constants) it would probably be better to add a new parameter to the hw_atom->validate function. Signed-off-by: Daniel Vetter <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915/i915_context.h')
-rw-r--r--src/gallium/drivers/i915/i915_context.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index f264b0611e6..1da637d068e 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -246,6 +246,7 @@ struct i915_context {
unsigned hardware_dirty;
unsigned immediate_dirty;
unsigned dynamic_dirty;
+ unsigned flush_dirty;
struct i915_winsys_buffer *validation_buffers[2 + 1 + I915_TEX_UNITS];
int num_validation_buffers;
@@ -289,6 +290,18 @@ struct i915_context {
#define I915_HW_CONSTANTS (1<<I915_CACHE_CONSTANTS)
#define I915_HW_IMMEDIATE (1<<(I915_MAX_CACHE+0))
#define I915_HW_INVARIANT (1<<(I915_MAX_CACHE+1))
+#define I915_HW_FLUSH (1<<(I915_MAX_CACHE+1))
+
+/* hw flush handling */
+#define I915_FLUSH_CACHE 1
+#define I915_PIPELINE_FLUSH 2
+
+static INLINE
+void i915_set_flush_dirty(struct i915_context *i915, unsigned flush)
+{
+ i915->hardware_dirty |= I915_HW_FLUSH;
+ i915->flush_dirty |= flush;
+}
/***********************************************************************