diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-04 22:30:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-04 22:30:29 +0100 |
commit | 8dc99b305a514dcd42c4260698e685a66dc95518 (patch) | |
tree | dae44280e1f86b13c11b6fdd76f4ffcaade266db | |
parent | 5982ed4da12a964351029c6f786348a11e33dc81 (diff) |
i965: Reset vertex_id after every batch
So that we always remember to re-emit the initial vertex elements state.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/i965_render.c | 17 | ||||
-rw-r--r-- | src/intel.h | 2 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 9dce3470..fd7e418a 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1853,12 +1853,12 @@ void i965_batch_commit_notify(intel_screen_private *intel) intel->last_floats_per_vertex = 0; intel->vertex_index = 0; + intel->gen4_render_state->composite_op.vertex_id = -1; + intel->gen6_render_state.num_sf_outputs = 0; intel->gen6_render_state.samplers = -1; intel->gen6_render_state.blend = -1; intel->gen6_render_state.kernel = -1; - intel->gen6_render_state.vertex_size = 0; - intel->gen6_render_state.vertex_type = 0; intel->gen6_render_state.drawrect = -1; } @@ -1883,13 +1883,14 @@ void gen4_render_state_init(ScrnInfoPtr scrn) sizeof(intel->surface_data), 4096); intel->surface_used = 0; - if (INTEL_INFO(intel)->gen >= 60) - return gen6_render_state_init(scrn); - if (intel->gen4_render_state == NULL) intel->gen4_render_state = calloc(sizeof(*render), 1); + if (INTEL_INFO(intel)->gen >= 60) + return gen6_render_state_init(scrn); + render = intel->gen4_render_state; + render->composite_op.vertex_id = -1; i965_static_stream_init(general = &stream[0]); if (IS_GEN5(intel)) @@ -2467,17 +2468,13 @@ gen6_render_state_init(ScrnInfoPtr scrn) intel->gen6_render_state.samplers = -1; intel->gen6_render_state.blend = -1; intel->gen6_render_state.kernel = -1; - intel->gen6_render_state.vertex_size = 0; - intel->gen6_render_state.vertex_type = 0; intel->gen6_render_state.drawrect = -1; - if (intel->gen4_render_state == NULL) - intel->gen4_render_state = calloc(sizeof(*render), 1); - i965_static_stream_init(&instruction); i965_static_stream_init(&dynamic); render = intel->gen4_render_state; + render->composite_op.vertex_id = -1; for (m = 0; m < WM_KERNEL_COUNT; m++) { render->wm_kernel[m] = diff --git a/src/intel.h b/src/intel.h index e75dc9de..8984c570 100644 --- a/src/intel.h +++ b/src/intel.h @@ -385,8 +385,6 @@ typedef struct intel_screen_private { struct { int num_sf_outputs; - int vertex_size; - int vertex_type; int drawrect; uint32_t blend; uint32_t samplers; |