Skip to content
Snippets Groups Projects
Commit 1904fe11 authored by Sviatoslav Peleshko's avatar Sviatoslav Peleshko Committed by Marge Bot
Browse files

anv: Release correct BO in anv_cmd_buffer_set_ray_query_buffer


If p_atomic_cmpxchg doesn't set the ray_query_shadow_bos[bucket] to new_bo
allocated by this thread, it returns the bucket BO allocated by the other
thread and we use it. But due to a mistake, we also release that BO, not
the candidate just allocated by this thread and never used again.

Fixes: 5d3e4193 ("anv: enable ray queries")
Signed-off-by: default avatarSviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <mesa/mesa!30581>
parent 09122e2b
No related branches found
No related tags found
No related merge requests found
......@@ -464,7 +464,7 @@ anv_cmd_buffer_set_ray_query_buffer(struct anv_cmd_buffer *cmd_buffer,
bo = p_atomic_cmpxchg(&device->ray_query_shadow_bos[bucket], NULL, new_bo);
if (bo != NULL) {
anv_device_release_bo(device, bo);
anv_device_release_bo(device, new_bo);
} else {
bo = new_bo;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment