i965: Remove the memcpy()ed atoms array now that everything is emit()-based.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
Eric Anholt
2011-10-22 12:16:05 -07:00
parent 35c7e8cebe
commit 2649ff4d90
2 changed files with 9 additions and 12 deletions
+2 -2
View File
@@ -876,8 +876,8 @@ struct brw_context
*/
GLuint program_id;
int num_prepare_atoms, num_emit_atoms;
struct brw_tracked_state prepare_atoms[64], emit_atoms[64];
int num_atoms;
const struct brw_tracked_state **atoms;
/* If (INTEL_DEBUG & DEBUG_BATCH) */
struct {
+7 -10
View File
@@ -254,17 +254,16 @@ void brw_init_state( struct brw_context *brw )
num_atoms = ARRAY_SIZE(gen4_atoms);
}
brw->atoms = atoms;
brw->num_atoms = num_atoms;
while (num_atoms--) {
assert((*atoms)->dirty.mesa |
(*atoms)->dirty.brw |
(*atoms)->dirty.cache);
assert(!(*atoms)->prepare);
assert((*atoms)->emit);
brw->emit_atoms[brw->num_emit_atoms++] = **atoms;
atoms++;
}
assert(brw->num_emit_atoms <= ARRAY_SIZE(brw->emit_atoms));
}
@@ -426,8 +425,6 @@ 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;
@@ -466,8 +463,8 @@ void brw_upload_state(struct brw_context *brw)
memset(&examined, 0, sizeof(examined));
prev = *state;
for (i = 0; i < num_atoms; i++) {
const struct brw_tracked_state *atom = &atoms[i];
for (i = 0; i < brw->num_atoms; i++) {
const struct brw_tracked_state *atom = brw->atoms[i];
struct brw_state_flags generated;
if (brw->intel.Fallback)
@@ -489,8 +486,8 @@ void brw_upload_state(struct brw_context *brw)
}
}
else {
for (i = 0; i < num_atoms; i++) {
const struct brw_tracked_state *atom = &atoms[i];
for (i = 0; i < brw->num_atoms; i++) {
const struct brw_tracked_state *atom = brw->atoms[i];
if (brw->intel.Fallback)
break;