summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-22 12:16:05 -0700
committerEric Anholt <[email protected]>2011-10-29 12:17:23 -0700
commit2649ff4d909fb4f1f1f4c06534170e0d3b4bcc73 (patch)
tree4a65a541359939852617dfdc3f2e8154cf968116 /src
parent35c7e8cebeaae67c80254224cda46ee17f6d5868 (diff)
i965: Remove the memcpy()ed atoms array now that everything is emit()-based.
Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c17
2 files changed, 9 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 86bf94cbea5..ff0fafaa85d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -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 {
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 66f27e256e6..79d9188f32f 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -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;