hasvk: Make a batch decoder for each queue family

The decoder context needs to know what engine it's associated with.
Nowadays, we have render, compute, blitter, even video engines being
used from the same driver.  Rather than trying to have a single decoder
and thwacking the engine field back and forth between calls, we make
one per queue family, and stash a pointer in anv_queue for easy access.

(Ported from anv: 79caf8a44b682f731c0fd3b941f38cc1869efe2d)

[dancingmirrors: Adapted for elk.]
This commit is contained in:
Kenneth Graunke authored and elwrcl committed 2026-07-21 14:54:59 +03:00
1 parent 2766ca3284
commit 203bf6b58d
4 files changed
+33 -17

No files matched your search

+3 -1
View File
@@ -949,6 +949,8 @@ struct anv_queue {
const struct anv_queue_family * family;
struct intel_batch_decode_ctx * decoder;
uint32_t exec_flags;
/** Synchronization object for debug purposes (DEBUG_SYNC) */
@@ -1067,7 +1069,7 @@ struct anv_device {
pthread_mutex_t mutex;
struct intel_batch_decode_ctx decoder_ctx;
struct intel_batch_decode_ctx decoder[ANV_MAX_QUEUE_FAMILIES];
/*
* When decoding a anv_cmd_buffer, we might need to search for BOs through
* the cmd_buffer's list.