anv: fix uninitialized use of compute initialization batch

We sometimes fail initialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 09d12e6727 ("anv: Add support for I915_ENGINE_CLASS_COMPUTE in init_device_state()")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25891>
This commit is contained in:
Lionel Landwerlin
2023-10-25 20:09:13 +03:00
committed by Marge Bot
parent 84001ea425
commit a97065adab

View File

@@ -599,12 +599,13 @@ init_render_queue_state(struct anv_queue *queue, bool is_companion_rcs_batch)
static VkResult
init_compute_queue_state(struct anv_queue *queue)
{
struct anv_batch batch;
UNUSED const struct intel_device_info *devinfo = queue->device->info;
uint32_t cmds[64];
batch.start = batch.next = cmds;
batch.end = (void *) cmds + sizeof(cmds);
struct anv_batch batch = {
.start = cmds,
.next = cmds,
.end = (void *) cmds + sizeof(cmds),
};
genX(emit_pipeline_select)(&batch, GPGPU);