anv: Stop clflushing events
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 22 Apr 2020 17:19:41 +0000 (12:19 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 4 May 2020 14:06:27 +0000 (14:06 +0000)
They're allocated out of the dynamic state pool which is snooped.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>

src/intel/vulkan/anv_device.c

index 012bb7d1976d22ce1807ef0e02b89da6ecd52b74..cf5fc4c5acff23e17ab0357c85a1cedd4cac46fe 100644 (file)
@@ -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;
 }