summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_query.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-10-04 10:37:09 +0200
committerSamuel Pitoiset <[email protected]>2018-10-04 10:56:25 +0200
commit2b34985d93e7914ead00227aa2842846df3c487f (patch)
tree0522fb7fe88974969d295c8d9173d2c9e882e9a4 /src/amd/vulkan/radv_query.c
parentb2a876a42bd0d55ad6705f8aff773da16806a2e6 (diff)
radv: fix resetting the pool for timestamp queries
Since the driver no longer uses the availability bit for timestamp queries it shouldn't reset it. Instead, it should reset the query values to UINT32_MAX. This fixes VM faults. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108164 Signed-off-by: Samuel Pitoiset <[email protected]> Tested-by: Józef Kucia <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_query.c')
-rw-r--r--src/amd/vulkan/radv_query.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index d607d24cfc6..41af16ba768 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -1088,20 +1088,18 @@ void radv_CmdResetQueryPool(
{
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
+ uint32_t value = pool->type == VK_QUERY_TYPE_TIMESTAMP
+ ? TIMESTAMP_NOT_READY : 0;
uint32_t flush_bits = 0;
flush_bits |= radv_fill_buffer(cmd_buffer, pool->bo,
firstQuery * pool->stride,
- queryCount * pool->stride, 0);
-
- if (pool->type == VK_QUERY_TYPE_TIMESTAMP ||
- pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) {
- uint32_t value = pool->type == VK_QUERY_TYPE_TIMESTAMP
- ? TIMESTAMP_NOT_READY : 0;
+ queryCount * pool->stride, value);
+ if (pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) {
flush_bits |= radv_fill_buffer(cmd_buffer, pool->bo,
pool->availability_offset + firstQuery * 4,
- queryCount * 4, value);
+ queryCount * 4, 0);
}
if (flush_bits) {