From: Jason Ekstrand Date: Wed, 22 Apr 2020 17:19:41 +0000 (-0500) Subject: anv: Stop clflushing events X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ac4e8e11f36cdfa18562804931be59a4fe08544;p=mesa.git anv: Stop clflushing events They're allocated out of the dynamic state pool which is snooped. Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 012bb7d1976..cf5fc4c5acf 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; }