mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
nouveau: allow invalidating coherent/persistent buffer backings
This is needed to support the core's usage of coherent buffers for glVertex-style input. The reason why this was disallowed is that any mappings will be invalidated. Let the state tracker worry about that, and just reallocate when we're told. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com> Cc: mesa-stable@lists.freedesktop.org Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5276>
This commit is contained in:
parent
c48f42e178
commit
6e1c47b98d
1 changed files with 0 additions and 5 deletions
|
|
@ -850,11 +850,6 @@ nouveau_buffer_invalidate(struct pipe_context *pipe,
|
||||||
if (unlikely(buf->base.bind & PIPE_BIND_SHARED))
|
if (unlikely(buf->base.bind & PIPE_BIND_SHARED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* We can't touch persistent/coherent buffers */
|
|
||||||
if (buf->base.flags & (PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
|
|
||||||
PIPE_RESOURCE_FLAG_MAP_COHERENT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* If the buffer is sub-allocated and not currently being written, just
|
/* If the buffer is sub-allocated and not currently being written, just
|
||||||
* wipe the valid buffer range. Otherwise we have to create fresh
|
* wipe the valid buffer range. Otherwise we have to create fresh
|
||||||
* storage. (We don't keep track of fences for non-sub-allocated BO's.)
|
* storage. (We don't keep track of fences for non-sub-allocated BO's.)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue