OSDN Git Service

anv/query: clflush the bo map on non-LLC platforms
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 18 Feb 2017 21:25:04 +0000 (13:25 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 21 Feb 2017 20:26:35 +0000 (12:26 -0800)
Found by inspection

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_query.c

index 293257b..da0deb8 100644 (file)
@@ -129,6 +129,9 @@ VkResult anv_GetQueryPoolResults(
    void *data_end = pData + dataSize;
    struct anv_query_pool_slot *slot = pool->bo.map;
 
+   if (!device->info.has_llc)
+      anv_invalidate_range(slot, MIN2(queryCount * sizeof(*slot), pool->bo.size));
+
    for (uint32_t i = 0; i < queryCount; i++) {
       switch (pool->type) {
       case VK_QUERY_TYPE_OCCLUSION: {