aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-09-26 10:49:44 -0700
committerKenneth Graunke <[email protected]>2014-11-29 02:18:46 -0800
commite563c33d57f779b34d885c561b731b3eb8eb25b7 (patch)
treefd7e653e07e5b2ca15a24241ea4b9eba4ea0ca27 /src/mesa/drivers/dri/i965/brw_wm_state.c
parent324368b500fc83fc8aa801ac2ab4db4427ebece1 (diff)
i965: Move CACHE_NEW_SAMPLER to BRW_NEW_SAMPLER_STATE_TABLE.
This flag signifies that we've emitted a new SAMPLER_STATE table. Given that we haven't cached those in years, CACHE_NEW_SAMPLER isn't a great name. Putting it in the BRW_NEW_* hierarchy would make more sense; BRW_NEW_SAMPLER_STATE_TABLE better reflects its actual purpose. When this flag is raised, the pointer to the SAMPLER_STATE table has changed, so we need to re-issue any packets which point to it (unit state on Gen4-5, 3DSTATE_SAMPLER_STATE_POINTERS on Gen6, and the per-stage variants on Gen7+). Saves 2 * sizeof(void *) bytes per context, as we remove useless aux_compare/aux_free function pointers. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 2f315c6996f..763ea5ff4d0 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -154,7 +154,7 @@ brw_upload_wm_unit(struct brw_context *brw)
}
if (brw->wm.base.sampler_count) {
- /* CACHE_NEW_SAMPLER - reloc */
+ /* BRW_NEW_SAMPLER_STATE_TABLE - reloc */
wm->wm4.sampler_state_pointer = (brw->batch.bo->offset64 +
brw->wm.base.sampler_offset) >> 5;
} else {
@@ -256,9 +256,9 @@ const struct brw_tracked_state brw_wm_unit = {
BRW_NEW_CURBE_OFFSETS |
BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_PROGRAM_CACHE |
+ BRW_NEW_SAMPLER_STATE_TABLE |
BRW_NEW_STATS_WM,
- .cache = CACHE_NEW_SAMPLER |
- CACHE_NEW_WM_PROG,
+ .cache = CACHE_NEW_WM_PROG,
},
.emit = brw_upload_wm_unit,
};