mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 18:50:17 +01:00
radv/rt: Execute memory barrier before updating the phase end count
We want to be sure that the values were updated before letting other invocations continue.
Fixes: 271865373 ("radv: Add PLOC shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20377>
This commit is contained in:
parent
0e0f42723e
commit
54ca0665c8
1 changed files with 2 additions and 2 deletions
|
|
@ -460,13 +460,13 @@ fetch_task(REF(radv_ir_header) header, bool did_work)
|
|||
atomicAdd(DEREF(header).sync_data.phase_index, 1);
|
||||
DEREF(header).sync_data.current_phase_start_counter =
|
||||
DEREF(header).sync_data.current_phase_end_counter;
|
||||
atomicAdd(DEREF(header).sync_data.current_phase_end_counter,
|
||||
DIV_ROUND_UP(task_count(header), gl_WorkGroupSize.x));
|
||||
/* Ensure the changes to the phase index and start/end counter are visible for other
|
||||
* workgroup waiting in the loop. */
|
||||
memoryBarrier(
|
||||
gl_ScopeDevice, gl_StorageSemanticsBuffer,
|
||||
gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable | gl_SemanticsMakeVisible);
|
||||
atomicAdd(DEREF(header).sync_data.current_phase_end_counter,
|
||||
DIV_ROUND_UP(task_count(header), gl_WorkGroupSize.x));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue