diff options
author | Eric Anholt <eric@anholt.net> | 2008-01-09 13:40:40 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-01-09 14:41:42 -0800 |
commit | 5f86ae057a645c03dc1e0c51c2fb1b2628a50e0a (patch) | |
tree | af4251b4feece3ed611c4606852708de1c688392 /src/mesa/drivers/dri/i965 | |
parent | d9edd8e90588417e3d549f25132dab2f21445792 (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/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_ioctl.c | 6 |
4 files changed, 6 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 2bc8849867..4575ff0321 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -84,21 +84,16 @@ static void brw_set_draw_region( struct intel_context *intel, /* called from intelFlushBatchLocked */ -static void brw_lost_hardware( struct intel_context *intel ) +static void brw_new_batch( struct intel_context *intel ) { struct brw_context *brw = brw_context(&intel->ctx); - /* Note that we effectively lose the context after this. - * - * Setting this flag provokes a state buffer wrap and also flushes - * the hardware caches. + /* Mark all context state as needing to be re-emitted. + * This is probably not as severe as on 915, since almost all of our state + * is just in referenced buffers. */ brw->state.dirty.brw |= BRW_NEW_CONTEXT; - /* Which means there shouldn't be any commands already queued: - */ - assert(intel->batch->ptr == intel->batch->map); - brw->state.dirty.mesa |= ~0; brw->state.dirty.brw |= ~0; brw->state.dirty.cache |= ~0; @@ -169,7 +164,7 @@ void brwInitVtbl( struct brw_context *brw ) brw->intel.vtbl.invalidate_state = brw_invalidate_state; brw->intel.vtbl.note_fence = brw_note_fence; brw->intel.vtbl.note_unlock = brw_note_unlock; - brw->intel.vtbl.lost_hardware = brw_lost_hardware; + brw->intel.vtbl.new_batch = brw_new_batch; brw->intel.vtbl.destroy = brw_destroy_context; brw->intel.vtbl.set_draw_region = brw_set_draw_region; brw->intel.vtbl.flush_cmd = brw_flush_cmd; diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index abcd6d5aab..4ee7ca6a26 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -755,7 +755,6 @@ static void intelContendedLock( struct intel_context *intel, GLuint flags ) sarea->ctxOwner, me); } sarea->ctxOwner = me; - intel->vtbl.lost_hardware( intel ); } /* If the last consumer of the texture memory wasn't us, notify the fake diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index accb3069f0..6c7fd8c12f 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -79,7 +79,7 @@ struct intel_context void (*destroy)( struct intel_context *intel ); void (*emit_state)( struct intel_context *intel ); void (*emit_invarient_state)( struct intel_context *intel ); - void (*lost_hardware)( struct intel_context *intel ); + void (*new_batch)( struct intel_context *intel ); void (*note_fence)( struct intel_context *intel, GLuint fence ); void (*note_unlock)( struct intel_context *intel ); void (*update_texture_state)( struct intel_context *intel ); diff --git a/src/mesa/drivers/dri/i965/intel_ioctl.c b/src/mesa/drivers/dri/i965/intel_ioctl.c index ebf5e3ae83..d55a19ff3b 100644 --- a/src/mesa/drivers/dri/i965/intel_ioctl.c +++ b/src/mesa/drivers/dri/i965/intel_ioctl.c @@ -196,10 +196,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); - } |