summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_state.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-04-27 09:35:03 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-05-16 00:11:51 -0700
commitb6f250d7f2f704c8681aaa2a158d1a39851b8494 (patch)
treeefe2c6e0933c9100260566bea5903aed4516102b /src/mesa/drivers/dri/i965/brw_state.h
parent97179c606c998b4f6810b4dc1c5007c848cda4ee (diff)
downloadexternal_mesa3d-b6f250d7f2f704c8681aaa2a158d1a39851b8494.zip
external_mesa3d-b6f250d7f2f704c8681aaa2a158d1a39851b8494.tar.gz
external_mesa3d-b6f250d7f2f704c8681aaa2a158d1a39851b8494.tar.bz2
i965: Send the minimal number of STATE_BASE_ADDRESS packets.
STATE_BASE_ADDRESS stalls the whole pipeline, and the documentation cautions us to emit it as little as possible for better performance. We recently put some hacks in BLORP to try and avoid emitting it if it was already set correctly. However, this wasn't quite minimal: if BLORP is the first operation (i.e. glClear()), then it would emit it, and subsequent draw calls would emit it again. This caused a small drop in performance in GPUTest Triangle when switching from Meta to BLORP. Unlike most packets, STATE_BASE_ADDRESS isn't influenced by GL state: it needs to be emitted once per batch, before most other commands, or whenever we change the program cache BO. It's also valid in both the 3D and compute pipelines, which makes it even more unique. This patch removes it from the atom mechanism and instead directly calls it as part of every draw, compute dispatch, or BLORP operation. We introduce a new flag indicating that STATE_BASE_ADDRESS has already been emitted this batch, and if so, skip doing it again. When we make a new program cache BO, we simply reset the flag, so the next operation will emit it again. When we flush/reset the batch, we reset the flag. This guarantees that we'll emit STATE_BASE_ADDRESS only when we have to. It's also less code than the old atom mechanism. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 880f44e..70b17fd 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -66,7 +66,6 @@ extern const struct brw_tracked_state brw_polygon_stipple;
extern const struct brw_tracked_state brw_recalculate_urb_fence;
extern const struct brw_tracked_state brw_sf_unit;
extern const struct brw_tracked_state brw_sf_vp;
-extern const struct brw_tracked_state brw_state_base_address;
extern const struct brw_tracked_state brw_vs_samplers;
extern const struct brw_tracked_state brw_tcs_samplers;
extern const struct brw_tracked_state brw_tes_samplers;
@@ -195,7 +194,6 @@ brw_depthbuffer_format(struct brw_context *brw);
void brw_upload_state_base_address(struct brw_context *brw);
-
/* gen8_depth_state.c */
void gen8_write_pma_stall_bits(struct brw_context *brw,
uint32_t pma_stall_bits);