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@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534>
This commit is contained in:
Lionel Landwerlin 2021-03-12 10:13:39 +02:00 committed by Marge Bot
parent 581e68bc99
commit 8e36f7da85
2 changed files with 9 additions and 0 deletions

View file

@ -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;
};

View file

@ -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;
}