Mesa (master): anv: move L3 initialization to device init on Gen11+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 12 20:54:19 UTC 2021
Module: Mesa
Branch: master
Commit: 8e36f7da85d7078bc63dfd709f0ab0b53fa6405d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e36f7da85d7078bc63dfd709f0ab0b53fa6405d
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Fri Mar 12 10:13:39 2021 +0200
anv: move L3 initialization to device init on Gen11+
On Gen11+ we tend to only use a single configuration, so just get rid
of the stalls in the command buffers by moving the config to device
initialization.
v2: drop NULL config check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534>
---
src/intel/vulkan/anv_private.h | 2 ++
src/intel/vulkan/genX_cmd_buffer.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 0bfe1523aa3..30ac0b69023 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1254,6 +1254,8 @@ struct anv_device {
struct intel_aux_map_context *aux_map_ctx;
+ const struct intel_l3_config *l3_config;
+
struct gen_debug_block_frame *debug_frame_desc;
};
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index c082c23bd79..f7ba136f1bb 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1887,6 +1887,12 @@ genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer,
if (cfg == cmd_buffer->state.current_l3_config)
return;
+#if GEN_GEN >= 11
+ /* On Gen11+ we use only one config, so verify it remains the same and skip
+ * the stalling programming entirely.
+ */
+ assert(cfg == cmd_buffer->device->l3_config);
+#else
if (INTEL_DEBUG & DEBUG_L3) {
mesa_logd("L3 config transition: ");
intel_dump_l3_config(cfg, stderr);
@@ -1934,6 +1940,7 @@ genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer,
}
genX(emit_l3_config)(&cmd_buffer->batch, cmd_buffer->device, cfg);
+#endif /* GEN_GEN >= 11 */
cmd_buffer->state.current_l3_config = cfg;
}
More information about the mesa-commit
mailing list