diff options
author | Jason Ekstrand <[email protected]> | 2017-03-14 18:02:41 -0700 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2017-03-29 19:12:18 +0300 |
commit | 6e2fb0cbcf5da43357741ddab7fa501ae8236ae3 (patch) | |
tree | 6be9c706f3d5bca265508bf72ba3f7f8f6b35658 /src/intel | |
parent | 8a5684d1bd2bdd4fc73ec5008685caab2919fbb0 (diff) |
anv/query: Invalidate the correct range
Reviewed-By: Lionel Landwerlin <[email protected]>
Cc: "17.0 13.0" <[email protected]>
(cherry picked from commit 81840130c0f147ed6ae4c26872c2f04a2167bc54)
[Andres Gomez: use anv_query.c instead of genX_query.c]
Signed-off-by: Andres Gomez <[email protected]>
Conflicts:
src/intel/vulkan/genX_query.c
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_query.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_query.c b/src/intel/vulkan/anv_query.c index 6fe94b0a4c2..ac7f652dd2d 100644 --- a/src/intel/vulkan/anv_query.c +++ b/src/intel/vulkan/anv_query.c @@ -129,8 +129,12 @@ 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)); + 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) { |