summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-01-09 13:40:40 -0800
committerEric Anholt <eric@anholt.net>2008-01-09 14:41:42 -0800
commit5f86ae057a645c03dc1e0c51c2fb1b2628a50e0a (patch)
treeaf4251b4feece3ed611c4606852708de1c688392 /src/mesa/drivers/dri/i915
parentd9edd8e90588417e3d549f25132dab2f21445792 (diff)
[intel] Rename lost_hardware vtbl entry to new_batch.
Both drivers have ended up relying on lost_hardware being called after each batch buffer, so update the name. This removes one of the calls on 965 whic h was outside of the batchbuffer handling code and just duplicating what had already happened through batchbuffer handling.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c4
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c9
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.h2
-rw-r--r--src/mesa/drivers/dri/i915/intel_ioctl.c11
4 files changed, 10 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index c23c02c060..412d146fe1 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -683,7 +683,7 @@ i830_update_color_z_regions(intelContextPtr intel,
/* This isn't really handled at the moment.
*/
static void
-i830_lost_hardware(struct intel_context *intel)
+i830_new_batch(struct intel_context *intel)
{
struct i830_context *i830 = i830_context(&intel->ctx);
i830->state.emitted = 0;
@@ -713,7 +713,7 @@ i830InitVtbl(struct i830_context *i830)
i830->intel.vtbl.check_vertex_size = i830_check_vertex_size;
i830->intel.vtbl.destroy = i830_destroy_context;
i830->intel.vtbl.emit_state = i830_emit_state;
- i830->intel.vtbl.lost_hardware = i830_lost_hardware;
+ i830->intel.vtbl.new_batch = i830_new_batch;
i830->intel.vtbl.reduced_primitive_state = i830_reduced_primitive_state;
i830->intel.vtbl.set_draw_region = i830_set_draw_region;
i830->intel.vtbl.update_texture_state = i830UpdateTextureState;
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 1de518ace1..8b45cdacbb 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -579,9 +579,14 @@ i915_set_draw_region(struct intel_context *intel,
static void
-i915_lost_hardware(struct intel_context *intel)
+i915_new_batch(struct intel_context *intel)
{
struct i915_context *i915 = i915_context(&intel->ctx);
+
+ /* Mark all state as needing to be emitted when starting a new batchbuffer.
+ * Using hardware contexts would be an alternative, but they have some
+ * difficulties associated with them (physical address requirements).
+ */
i915->state.emitted = 0;
}
@@ -607,7 +612,7 @@ i915InitVtbl(struct i915_context *i915)
i915->intel.vtbl.check_vertex_size = i915_check_vertex_size;
i915->intel.vtbl.destroy = i915_destroy_context;
i915->intel.vtbl.emit_state = i915_emit_state;
- i915->intel.vtbl.lost_hardware = i915_lost_hardware;
+ i915->intel.vtbl.new_batch = i915_new_batch;
i915->intel.vtbl.reduced_primitive_state = i915_reduced_primitive_state;
i915->intel.vtbl.render_start = i915_render_start;
i915->intel.vtbl.render_prevalidate = i915_render_prevalidate;
diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h
index 528e749c33..b1648cd85d 100644
--- a/src/mesa/drivers/dri/i915/intel_context.h
+++ b/src/mesa/drivers/dri/i915/intel_context.h
@@ -85,7 +85,7 @@ struct intel_context
{
void (*destroy) (struct intel_context * intel);
void (*emit_state) (struct intel_context * intel);
- void (*lost_hardware) (struct intel_context * intel);
+ void (*new_batch) (struct intel_context * intel);
void (*update_texture_state) (struct intel_context * intel);
void (*render_start) (struct intel_context * intel);
diff --git a/src/mesa/drivers/dri/i915/intel_ioctl.c b/src/mesa/drivers/dri/i915/intel_ioctl.c
index 3cd8344b48..187a6e901b 100644
--- a/src/mesa/drivers/dri/i915/intel_ioctl.c
+++ b/src/mesa/drivers/dri/i915/intel_ioctl.c
@@ -124,11 +124,6 @@ intel_batch_ioctl(struct intel_context *intel,
UNLOCK_HARDWARE(intel);
exit(1);
}
-
- /* FIXME: use hardware contexts to avoid 'losing' hardware after
- * each buffer flush.
- */
- intel->vtbl.lost_hardware(intel);
}
void
@@ -176,10 +171,4 @@ intel_exec_ioctl(struct intel_context *intel,
exit(1);
}
*fence = fo;
-
- /* FIXME: use hardware contexts to avoid 'losing' hardware after
- * each buffer flush.
- */
- intel->vtbl.lost_hardware(intel);
-
}