mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 01:38:06 +02:00
kk: Propagate availability before we reset it in vkCmdResetQueryPool
Required to avoid availability write races. We could have an availability update pending so adding the reset availability write to the same pool of writes led to write races. Avoid this by flushing writes before reseting queries. Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com> Signed-off-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
This commit is contained in:
parent
53cea0ab43
commit
ea7f5f7f1c
1 changed files with 6 additions and 3 deletions
|
|
@ -254,10 +254,13 @@ kk_CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool,
|
|||
{
|
||||
VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer);
|
||||
VK_FROM_HANDLE(kk_query_pool, pool, queryPool);
|
||||
/* Need to flush other availabilities just in case there is a reset after it
|
||||
* was made available but the writes have not propagated yet. Need to avoid
|
||||
* data rances in the writes. This is save to do sice vkCmdResetQueryPool
|
||||
* cannot be called when a render pass is active. */
|
||||
upload_queue_writes(cmd);
|
||||
emit_zero_queries(cmd, pool, firstQuery, queryCount, false);
|
||||
/* If we are not mid encoder, just upload the writes */
|
||||
if (cmd->encoder->main.last_used == KK_ENC_NONE)
|
||||
upload_queue_writes(cmd);
|
||||
upload_queue_writes(cmd);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue