From c4e7578fa6bd7ae887143d3e7780e2bc0ecc9b06 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 14 Nov 2024 10:24:46 +0200 Subject: [PATCH] anv: pass anv_device to batch_set_preemption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli Reviewed-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_genX.h | 2 +- src/intel/vulkan/genX_cmd_buffer.c | 8 ++++---- src/intel/vulkan/genX_gpu_memcpy.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h index eb8c393179a..badd059c18b 100644 --- a/src/intel/vulkan/anv_genX.h +++ b/src/intel/vulkan/anv_genX.h @@ -294,7 +294,7 @@ genX(ray_tracing_pipeline_emit)(struct anv_ray_tracing_pipeline *pipeline); void genX(batch_set_preemption)(struct anv_batch *batch, - const struct intel_device_info *devinfo, + struct anv_device *device, uint32_t current_pipeline, bool value); diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index a650e715667..a71d4cf814c 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2584,12 +2584,12 @@ genX(batch_emit_pipe_control_write)(struct anv_batch *batch, /* Set preemption on/off. */ void genX(batch_set_preemption)(struct anv_batch *batch, - const struct intel_device_info *devinfo, + struct anv_device *device, uint32_t current_pipeline, bool value) { #if INTEL_WA_16013994831_GFX_VER - if (!intel_needs_workaround(devinfo, 16013994831)) + if (!intel_needs_workaround(device->info, 16013994831)) return; anv_batch_write_reg(batch, GENX(CS_CHICKEN1), cc1) { @@ -2598,7 +2598,7 @@ genX(batch_set_preemption)(struct anv_batch *batch, } /* Wa_16013994831 - we need to insert CS_STALL and 250 noops. */ - genx_batch_emit_pipe_control(batch, devinfo, current_pipeline, + genx_batch_emit_pipe_control(batch, device->info, current_pipeline, ANV_PIPE_CS_STALL_BIT); for (unsigned i = 0; i < 250; i++) @@ -2613,7 +2613,7 @@ genX(cmd_buffer_set_preemption)(struct anv_cmd_buffer *cmd_buffer, bool value) if (cmd_buffer->state.gfx.object_preemption == value) return; - genX(batch_set_preemption)(&cmd_buffer->batch, cmd_buffer->device->info, + genX(batch_set_preemption)(&cmd_buffer->batch, cmd_buffer->device, cmd_buffer->state.current_pipeline, value); cmd_buffer->state.gfx.object_preemption = value; diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c index 7f0b72d3dec..86503c64d90 100644 --- a/src/intel/vulkan/genX_gpu_memcpy.c +++ b/src/intel/vulkan/genX_gpu_memcpy.c @@ -103,7 +103,7 @@ emit_common_so_memcpy(struct anv_memcpy_state *state, #if INTEL_WA_16013994831_GFX_VER /* Wa_16013994831 - Disable preemption during streamout. */ if (intel_needs_workaround(device->info, 16013994831)) - genX(batch_set_preemption)(batch, device->info, _3D, false); + genX(batch_set_preemption)(batch, device, _3D, false); #endif anv_batch_emit(batch, GENX(3DSTATE_SBE), sbe) { @@ -357,7 +357,7 @@ void genX(emit_so_memcpy_end)(struct anv_memcpy_state *state) { if (intel_needs_workaround(state->device->info, 16013994831)) - genX(batch_set_preemption)(state->batch, state->device->info, _3D, true); + genX(batch_set_preemption)(state->batch, state->device, _3D, true); anv_batch_emit(state->batch, GENX(MI_BATCH_BUFFER_END), end);