From f421db70ba5b987891458b98ae3b0d0ddc586315 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 26 Sep 2014 01:50:04 -0700 Subject: i965: Combine CACHE_NEW_*_UNIT into BRW_NEW_GEN4_UNIT_STATE. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Gen4-5, unit state is specified as indirect state, rather than commands. If any unit state changes, we upload it via brw_state_batch and arrange for 3DSTATE_PIPELINED_POINTERS to be re-emitted, which updates pointers to all unit state at once. Since there's only one command and state atom (brw_psp_urb_cs) that needs to know about this, there's no benefit to having six separate flags. We can combine CACHE_NEW_*_UNIT into a single flag. We also haven't cached these in a long time, so it doesn't make sense to use the "CACHE_NEW_" prefix. Instead, use the "BRW_NEW_" prefix. This also saves 12 * sizeof(void *) bytes of memory per context, as we remove useless aux_compare/aux_free functions for each CACHE bit. Signed-off-by: Kenneth Graunke Reviewed-by: Kristian Høgsberg Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_vs_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i965/brw_vs_state.c') diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c index 8859200..cd740db 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_state.c @@ -181,7 +181,7 @@ brw_upload_vs_unit(struct brw_context *brw) I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER); } - brw->state.dirty.cache |= CACHE_NEW_VS_UNIT; + brw->state.dirty.brw |= BRW_NEW_GEN4_UNIT_STATE; } const struct brw_tracked_state brw_vs_unit = { -- cgit v1.1