summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_state_upload.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-11-24 23:57:48 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-12-02 17:00:26 -0800
commit4f24c168c87e9938f35f5ec135062408148be373 (patch)
tree40d36afa98ee6fb039a7e39697c0426b000ade1d /src/mesa/drivers/dri/i965/brw_state_upload.c
parentce44b2061cf59264b4f22271e8d70cdc826af6de (diff)
downloadexternal_mesa3d-4f24c168c87e9938f35f5ec135062408148be373.zip
external_mesa3d-4f24c168c87e9938f35f5ec135062408148be373.tar.gz
external_mesa3d-4f24c168c87e9938f35f5ec135062408148be373.tar.bz2
i965: Move BRW_NEW_*_PROG_DATA flags to .brw (not .cache).
I put the BRW_NEW_*_PROG_DATA flags at the beginning so that brw_state_cache.c can still continue using 1 << brw_cache_id. I also added a comment explaining the difference between BRW_NEW_*_PROG_DATA and BRW_NEW_*_PROGRAM, as it took me a long time to remember it. Non-mechanical changes: - brw_state_cache.c and brw_ff_gs.c now signal .brw, not .cache. - brw_state_upload.c - INTEL_DEBUG=state changes. - brw_context.h - bit definition merging. v2: Correct the explanation of BRW_NEW_*_PROG_DATA to mention state-based recompiles, and nix the "proper subset" claim, as it's false. (Caught by Kristian Høgsberg). 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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 5ad0668..875f434 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -486,6 +486,13 @@ static struct dirty_bit_map mesa_bits[] = {
};
static struct dirty_bit_map brw_bits[] = {
+ DEFINE_BIT(BRW_NEW_FS_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_BLORP_BLIT_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_SF_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_VS_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_FF_GS_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_GS_PROG_DATA),
+ DEFINE_BIT(BRW_NEW_CLIP_PROG_DATA),
DEFINE_BIT(BRW_NEW_URB_FENCE),
DEFINE_BIT(BRW_NEW_FRAGMENT_PROGRAM),
DEFINE_BIT(BRW_NEW_GEOMETRY_PROGRAM),
@@ -528,13 +535,6 @@ static struct dirty_bit_map brw_bits[] = {
};
static struct dirty_bit_map cache_bits[] = {
- DEFINE_BIT(BRW_NEW_FS_PROG_DATA),
- DEFINE_BIT(BRW_NEW_BLORP_BLIT_PROG_DATA),
- DEFINE_BIT(BRW_NEW_SF_PROG_DATA),
- DEFINE_BIT(BRW_NEW_VS_PROG_DATA),
- DEFINE_BIT(BRW_NEW_FF_GS_PROG_DATA),
- DEFINE_BIT(BRW_NEW_GS_PROG_DATA),
- DEFINE_BIT(BRW_NEW_CLIP_PROG_DATA),
{0, 0, 0}
};
@@ -648,7 +648,6 @@ void brw_upload_state(struct brw_context *brw)
if (unlikely(INTEL_DEBUG & DEBUG_STATE)) {
STATIC_ASSERT(ARRAY_SIZE(brw_bits) == BRW_NUM_STATE_BITS + 1);
- STATIC_ASSERT(ARRAY_SIZE(cache_bits) == BRW_MAX_CACHE + 1);
brw_update_dirty_count(mesa_bits, state->mesa);
brw_update_dirty_count(brw_bits, state->brw);