[Mesa-dev] [PATCH] anv/query: clflush the bo map on non-LLC platforms

Jason Ekstrand jason at jlekstrand.net
Sat Feb 18 21:32:29 UTC 2017


Found by inspection

Cc: "13.0 17.0" <mesa-dev at lists.freedesktop.org>
---
 src/intel/vulkan/anv_query.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/vulkan/anv_query.c b/src/intel/vulkan/anv_query.c
index 293257b..d674e83 100644
--- a/src/intel/vulkan/anv_query.c
+++ b/src/intel/vulkan/anv_query.c
@@ -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_clflush_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: {
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list