diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-04 22:30:29 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-05-29 23:46:56 +0100 |
commit | 2fe243c05528c9dadeae01aec536b41bd87475bc (patch) | |
tree | d926cd725d62ec47e804bd90d925a2c064e2d740 | |
parent | 2766d6de9cadd394c1f7b3ab1b116b0d332afbfc (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>
(cherry picked from commit 8dc99b305a514dcd42c4260698e685a66dc95518)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-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 30dd0176..93558fb3 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1851,12 +1851,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; } @@ -1881,13 +1881,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)) @@ -2465,17 +2466,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 27c0c3ab..dc03ab6b 100644 --- a/src/intel.h +++ b/src/intel.h @@ -640,8 +640,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; |