mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02: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);
|
atomicAdd(DEREF(header).sync_data.phase_index, 1);
|
||||||
DEREF(header).sync_data.current_phase_start_counter =
|
DEREF(header).sync_data.current_phase_start_counter =
|
||||||
DEREF(header).sync_data.current_phase_end_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
|
/* Ensure the changes to the phase index and start/end counter are visible for other
|
||||||
* workgroup waiting in the loop. */
|
* workgroup waiting in the loop. */
|
||||||
memoryBarrier(
|
memoryBarrier(
|
||||||
gl_ScopeDevice, gl_StorageSemanticsBuffer,
|
gl_ScopeDevice, gl_StorageSemanticsBuffer,
|
||||||
gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable | gl_SemanticsMakeVisible);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue