From 4ac4e8e11f36cdfa18562804931be59a4fe08544 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 22 Apr 2020 12:19:41 -0500 Subject: [PATCH] anv: Stop clflushing events They're allocated out of the dynamic state pool which is snooped. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_device.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 012bb7d..cf5fc4c 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -4089,12 +4089,6 @@ VkResult anv_CreateEvent( event->state = state; event->semaphore = VK_EVENT_RESET; - if (!device->info.has_llc) { - /* Make sure the writes we're flushing have landed. */ - __builtin_ia32_mfence(); - __builtin_ia32_clflush(event); - } - *pEvent = anv_event_to_handle(event); return VK_SUCCESS; @@ -4124,13 +4118,6 @@ VkResult anv_GetEventStatus( if (anv_device_is_lost(device)) return VK_ERROR_DEVICE_LOST; - if (!device->info.has_llc) { - /* Invalidate read cache before reading event written by GPU. */ - __builtin_ia32_clflush(event); - __builtin_ia32_mfence(); - - } - return event->semaphore; } @@ -4138,17 +4125,10 @@ VkResult anv_SetEvent( VkDevice _device, VkEvent _event) { - ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_event, event, _event); event->semaphore = VK_EVENT_SET; - if (!device->info.has_llc) { - /* Make sure the writes we're flushing have landed. */ - __builtin_ia32_mfence(); - __builtin_ia32_clflush(event); - } - return VK_SUCCESS; } @@ -4156,17 +4136,10 @@ VkResult anv_ResetEvent( VkDevice _device, VkEvent _event) { - ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_event, event, _event); event->semaphore = VK_EVENT_RESET; - if (!device->info.has_llc) { - /* Make sure the writes we're flushing have landed. */ - __builtin_ia32_mfence(); - __builtin_ia32_clflush(event); - } - return VK_SUCCESS; } -- 2.7.4