Mesa (staging/20.0): nouveau: allow invalidating coherent/persistent buffer backings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 21:38:29 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: e5257b88f428b6eae5501dcc98d2f91a18ed9556
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5257b88f428b6eae5501dcc98d2f91a18ed9556
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat May 30 02:47:42 2020 -0400
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 at alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Cc: mesa-stable at lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5276>
(cherry picked from commit 6e1c47b98df384b46ff41ffbf9689a93c78c040d)
---
.pick_status.json | 2 +-
src/gallium/drivers/nouveau/nouveau_buffer.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index ef71127380a..df57c13a527 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -319,7 +319,7 @@
"description": "nouveau: allow invalidating coherent/persistent buffer backings",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index 42f68fa9bdf..abb4105099a 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -850,11 +850,6 @@ nouveau_buffer_invalidate(struct pipe_context *pipe,
if (unlikely(buf->base.bind & PIPE_BIND_SHARED))
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
* 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.)
More information about the mesa-commit
mailing list