Mesa (master): iris: Skip double-disabling TCS/TES/GS after BLORP operations
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 19 14:57:01 UTC 2019
Module: Mesa
Branch: master
Commit: 706c9f2d6072b1f1eeef90e6d67bcaeda0529e16
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=706c9f2d6072b1f1eeef90e6d67bcaeda0529e16
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Sep 19 00:33:28 2019 -0700
iris: Skip double-disabling TCS/TES/GS after BLORP operations
BLORP always turns off TCS/TES/GS. If regular drawing also has them
disabled (the overwhelmingly common case), then leaving them disabled
is just fine by us and we can skip dirtying them, as that would just
re-disable them a second time on the next draw.
If they are actually enabled, however, we do need to flag them.
Cuts 52% of the 3DSTATE_HS packets in an Aztec Ruins trace.
---
src/gallium/drivers/iris/iris_blorp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_blorp.c b/src/gallium/drivers/iris/iris_blorp.c
index f357b922e58..fa46dafcda2 100644
--- a/src/gallium/drivers/iris/iris_blorp.c
+++ b/src/gallium/drivers/iris/iris_blorp.c
@@ -342,6 +342,23 @@ iris_blorp_exec(struct blorp_batch *blorp_batch,
IRIS_DIRTY_SAMPLER_STATES_TES |
IRIS_DIRTY_SAMPLER_STATES_GS);
+ if (!ice->shaders.uncompiled[MESA_SHADER_TESS_EVAL]) {
+ /* BLORP disabled tessellation, that's fine for the next draw */
+ skip_bits |= IRIS_DIRTY_TCS |
+ IRIS_DIRTY_TES |
+ IRIS_DIRTY_CONSTANTS_TCS |
+ IRIS_DIRTY_CONSTANTS_TES |
+ IRIS_DIRTY_BINDINGS_TCS |
+ IRIS_DIRTY_BINDINGS_TES;
+ }
+
+ if (!ice->shaders.uncompiled[MESA_SHADER_GEOMETRY]) {
+ /* BLORP disabled geometry shaders, that's fine for the next draw */
+ skip_bits |= IRIS_DIRTY_GS |
+ IRIS_DIRTY_CONSTANTS_GS |
+ IRIS_DIRTY_BINDINGS_GS;
+ }
+
/* we can skip flagging IRIS_DIRTY_DEPTH_BUFFER, if
* BLORP_BATCH_NO_EMIT_DEPTH_STENCIL is set.
*/
More information about the mesa-commit
mailing list