diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-09-26 01:50:04 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-11-29 02:18:38 -0800 |
commit | f421db70ba5b987891458b98ae3b0d0ddc586315 (patch) | |
tree | bf06f4f32d611e456c1c39537b53ab9add03a52c /src/mesa/drivers/dri/i965/brw_state_upload.c | |
parent | bea9b8e306e8424ffacbdfc99ca2fc91f1c9912b (diff) | |
download | external_mesa3d-f421db70ba5b987891458b98ae3b0d0ddc586315.zip external_mesa3d-f421db70ba5b987891458b98ae3b0d0ddc586315.tar.gz external_mesa3d-f421db70ba5b987891458b98ae3b0d0ddc586315.tar.bz2 |
i965: Combine CACHE_NEW_*_UNIT into BRW_NEW_GEN4_UNIT_STATE.
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 <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state_upload.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 1c53e5b..1235d49 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -521,26 +521,21 @@ static struct dirty_bit_map brw_bits[] = { DEFINE_BIT(BRW_NEW_PUSH_CONSTANT_ALLOCATION), DEFINE_BIT(BRW_NEW_NUM_SAMPLES), DEFINE_BIT(BRW_NEW_TEXTURE_BUFFER), + DEFINE_BIT(BRW_NEW_GEN4_UNIT_STATE), {0, 0, 0} }; static struct dirty_bit_map cache_bits[] = { DEFINE_BIT(CACHE_NEW_CC_VP), - DEFINE_BIT(CACHE_NEW_CC_UNIT), DEFINE_BIT(CACHE_NEW_WM_PROG), DEFINE_BIT(CACHE_NEW_BLORP_BLIT_PROG), DEFINE_BIT(CACHE_NEW_SAMPLER), - DEFINE_BIT(CACHE_NEW_WM_UNIT), DEFINE_BIT(CACHE_NEW_SF_PROG), DEFINE_BIT(CACHE_NEW_SF_VP), - DEFINE_BIT(CACHE_NEW_SF_UNIT), - DEFINE_BIT(CACHE_NEW_VS_UNIT), DEFINE_BIT(CACHE_NEW_VS_PROG), - DEFINE_BIT(CACHE_NEW_FF_GS_UNIT), DEFINE_BIT(CACHE_NEW_FF_GS_PROG), DEFINE_BIT(CACHE_NEW_GS_PROG), DEFINE_BIT(CACHE_NEW_CLIP_VP), - DEFINE_BIT(CACHE_NEW_CLIP_UNIT), DEFINE_BIT(CACHE_NEW_CLIP_PROG), {0, 0, 0} }; |