mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
nvc0: return NULL instead of asserting in nvc0_resource_from_user_memory
Fixes: 212f1ab40e ("nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY")
Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
This commit is contained in:
parent
89d709a43e
commit
277925471e
1 changed files with 3 additions and 5 deletions
|
|
@ -141,11 +141,9 @@ nvc0_resource_from_user_memory(struct pipe_screen *pipe,
|
|||
const struct pipe_resource *templ,
|
||||
void *user_memory)
|
||||
{
|
||||
ASSERTED struct nouveau_screen *screen = nouveau_screen(pipe);
|
||||
|
||||
assert(screen->has_svm);
|
||||
assert(templ->target == PIPE_BUFFER);
|
||||
|
||||
struct nouveau_screen *screen = nouveau_screen(pipe);
|
||||
if (!screen->has_svm || templ->target != PIPE_BUFFER)
|
||||
return NULL;
|
||||
return nouveau_buffer_create_from_user(pipe, templ, user_memory);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue