diff options
author | Eric Anholt <[email protected]> | 2011-10-22 12:11:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-10-29 12:17:21 -0700 |
commit | 35c7e8cebeaae67c80254224cda46ee17f6d5868 (patch) | |
tree | 4ff7dd49920c8b3354da3a52d4f4e51211a2ed13 /src/mesa/drivers/dri | |
parent | 68c813e8eaf46594b1a3c4b0f49ff6edd9d60c75 (diff) |
i965: Merge brw_validate_state() and brw_upload_state() together.
They were called back-to-back at this point.
Reviewed-by: Kenneth Graunke <[email protected]>
Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 16 |
3 files changed, 5 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index aa03f00f558..1571fb74d6c 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -359,13 +359,6 @@ retry: * brw->state.dirty.brw. */ if (brw->state.dirty.brw) { - brw_validate_state(brw); - - if (brw->intel.Fallback) { - retval = false; - goto out; - } - intel->no_batch_wrap = true; brw_upload_state(brw); diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 208b683f9ed..b23b1cfba4b 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -124,7 +124,6 @@ extern const struct brw_tracked_state gen7_wm_surfaces; /*********************************************************************** * brw_state.c */ -void brw_validate_state(struct brw_context *brw); void brw_upload_state(struct brw_context *brw); void brw_init_state(struct brw_context *brw); void brw_destroy_state(struct brw_context *brw); diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 620c629805e..66f27e256e6 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -421,11 +421,15 @@ brw_print_dirty_count(struct dirty_bit_map *bit_map, int32_t bits) /*********************************************************************** * Emit all state: */ -void brw_validate_state( struct brw_context *brw ) +void brw_upload_state(struct brw_context *brw) { struct gl_context *ctx = &brw->intel.ctx; struct intel_context *intel = &brw->intel; struct brw_state_flags *state = &brw->state.dirty; + const struct brw_tracked_state *atoms = brw->emit_atoms; + int num_atoms = brw->num_emit_atoms; + int i; + static int dirty_count = 0; state->mesa |= brw->intel.NewGLState; brw->intel.NewGLState = 0; @@ -452,16 +456,6 @@ void brw_validate_state( struct brw_context *brw ) brw->intel.Fallback = false; /* boolean, not bitfield */ intel_check_front_buffer_rendering(intel); -} - - -void brw_upload_state(struct brw_context *brw) -{ - struct brw_state_flags *state = &brw->state.dirty; - const struct brw_tracked_state *atoms = brw->emit_atoms; - int num_atoms = brw->num_emit_atoms; - int i; - static int dirty_count = 0; if (unlikely(INTEL_DEBUG)) { /* Debug version which enforces various sanity checks on the |