Module: Mesa
Branch: main
Commit: 6f02f9d1084087c97005815bb6070053d09a422c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f02f9d1084087c97005815bb6070053d09a422c

Author: Lionel Landwerlin <[email protected]>
Date:   Fri Jan 20 09:41:04 2023 +0200

anv: fix preemption enable emission in gpu_memcpy

This has to be before the MI_BATCH_BUFFER_END otherwise it has no
effect.

This also was messing around with you batch length alignment.

Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: b9aa66d5d0 ("anv: disable preemption for 3DPRIMITIVE during streamout")
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20802>

---

 src/intel/vulkan/genX_gpu_memcpy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/intel/vulkan/genX_gpu_memcpy.c 
b/src/intel/vulkan/genX_gpu_memcpy.c
index 27ee96604ed..19b97c284de 100644
--- a/src/intel/vulkan/genX_gpu_memcpy.c
+++ b/src/intel/vulkan/genX_gpu_memcpy.c
@@ -258,13 +258,13 @@ genX(emit_so_memcpy_fini)(struct anv_memcpy_state *state)
 void
 genX(emit_so_memcpy_end)(struct anv_memcpy_state *state)
 {
+   if (intel_device_info_is_dg2(state->device->info))
+      genX(batch_set_preemption)(state->batch, true);
+
    anv_batch_emit(state->batch, GENX(MI_BATCH_BUFFER_END), end);
 
    if ((state->batch->next - state->batch->start) & 4)
       anv_batch_emit(state->batch, GENX(MI_NOOP), noop);
-
-   if (intel_device_info_is_dg2(state->device->info))
-      genX(batch_set_preemption)(state->batch, true);
 }
 
 void

Reply via email to