summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-03-14 18:02:41 -0700
committerJason Ekstrand <[email protected]>2017-03-16 15:08:17 -0700
commit81840130c0f147ed6ae4c26872c2f04a2167bc54 (patch)
tree8d544daa1208f33f2e11f24cbbd6a96a5a988346 /src
parent4bbb4b95b8ba02693f5e6990b983ebb66dc6241a (diff)
anv/query: Invalidate the correct range
Reviewed-By: Lionel Landwerlin <[email protected]> Cc: "17.0 13.0" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/genX_query.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c
index 4e6638a0aeb..72ac2cb6774 100644
--- a/src/intel/vulkan/genX_query.c
+++ b/src/intel/vulkan/genX_query.c
@@ -132,8 +132,12 @@ VkResult genX(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));
+ if (!device->info.has_llc) {
+ uint64_t offset = firstQuery * sizeof(*slot);
+ uint64_t size = queryCount * sizeof(*slot);
+ anv_invalidate_range(pool->bo.map + offset,
+ MIN2(size, pool->bo.size - offset));
+ }
for (uint32_t i = 0; i < queryCount; i++) {
switch (pool->type) {