diff options
author | Kenneth Graunke <[email protected]> | 2011-11-09 21:32:17 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-11-10 22:51:20 -0800 |
commit | 9ae10e9cbdfce6404a3d86188f2897d8f5d0dcb2 (patch) | |
tree | d087795a3ebd723ae439f03d43fbf7f9aa3106af | |
parent | d46dfed9585e7e8a26993e7f67faffe8e2641939 (diff) |
i965: Make Gen6+ renderbuffer surface updates not depend on NEW_COLOR.
NEW_COLOR is only needed on Gen4-5 as brw_update_renderbuffer_surfaces
only uses ctx->Color when intel->gen < 6.
This should reduce unnecessary state updates.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 9 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index f004633c27e..2157ffd37e8 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -89,6 +89,7 @@ extern const struct brw_tracked_state gen6_clip_vp; extern const struct brw_tracked_state gen6_color_calc_state; extern const struct brw_tracked_state gen6_depth_stencil_state; extern const struct brw_tracked_state gen6_gs_state; +extern const struct brw_tracked_state gen6_renderbuffer_surfaces; extern const struct brw_tracked_state gen6_sampler_state; extern const struct brw_tracked_state gen6_scissor_state; extern const struct brw_tracked_state gen6_sf_state; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index a9efc95775e..730a0e8a12b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -143,7 +143,7 @@ static const struct brw_tracked_state *gen6_atoms[] = */ &brw_vs_pull_constants, &brw_wm_pull_constants, - &brw_renderbuffer_surfaces, + &gen6_renderbuffer_surfaces, &brw_texture_surfaces, &brw_binding_table, @@ -210,7 +210,7 @@ const struct brw_tracked_state *gen7_atoms[] = */ &brw_vs_pull_constants, &brw_wm_pull_constants, - &brw_renderbuffer_surfaces, + &gen6_renderbuffer_surfaces, &brw_texture_surfaces, &brw_binding_table, diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 377b19dae5d..0cc62017cbe 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -577,6 +577,15 @@ const struct brw_tracked_state brw_renderbuffer_surfaces = { .emit = brw_update_renderbuffer_surfaces, }; +const struct brw_tracked_state gen6_renderbuffer_surfaces = { + .dirty = { + .mesa = _NEW_BUFFERS, + .brw = BRW_NEW_BATCH, + .cache = 0 + }, + .emit = brw_update_renderbuffer_surfaces, +}; + /** * Construct SURFACE_STATE objects for enabled textures. */ |