mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
gallium/u_threaded: always map idle buffers unsynchronized
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10662>
This commit is contained in:
parent
e8b2779455
commit
6ac085966b
1 changed files with 5 additions and 4 deletions
|
|
@ -1937,11 +1937,12 @@ tc_improve_map_buffer_flags(struct threaded_context *tc,
|
|||
return usage & ~PIPE_MAP_DISCARD_WHOLE_RESOURCE;
|
||||
}
|
||||
|
||||
/* See if the buffer range being mapped has never been initialized,
|
||||
* in which case it can be mapped unsynchronized. */
|
||||
/* See if the buffer range being mapped has never been initialized or
|
||||
* the buffer is idle, in which case it can be mapped unsynchronized. */
|
||||
if (!(usage & PIPE_MAP_UNSYNCHRONIZED) &&
|
||||
!tres->is_shared &&
|
||||
!util_ranges_intersect(&tres->valid_buffer_range, offset, offset + size))
|
||||
((!tres->is_shared &&
|
||||
!util_ranges_intersect(&tres->valid_buffer_range, offset, offset + size)) ||
|
||||
!tc_is_buffer_busy(tc, tres, usage)))
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
|
||||
if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue