mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 01:28:07 +02:00
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 <samuel.pitoiset@gmail.com> Tested-by: Józef Kucia <joseph.kucia@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
b2a876a42b
commit
2b34985d93
1 changed files with 5 additions and 7 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue