lavapipe: report out-of-memory when binding
This isn't the perfect error-code, but we don't really have anything better, it seems. The ideal fix here would be to fix LLVMpipe to support larger textures, but this is probably as far as I'm interested in chasing down this path for now. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
This commit is contained in:

committed by
Marge Bot

parent
6012dec550
commit
e10618f6f5
@@ -852,10 +852,12 @@ static bool llvmpipe_resource_bind_backing(struct pipe_screen *screen,
|
||||
if (!lpr->backable)
|
||||
return FALSE;
|
||||
|
||||
if (llvmpipe_resource_is_texture(&lpr->base)) {
|
||||
if (lpr->size_required > LP_MAX_TEXTURE_SIZE)
|
||||
return FALSE;
|
||||
|
||||
if (llvmpipe_resource_is_texture(&lpr->base))
|
||||
lpr->tex_data = (char *)pmem + offset;
|
||||
else
|
||||
} else
|
||||
lpr->data = (char *)pmem + offset;
|
||||
lpr->backing_offset = offset;
|
||||
|
||||
|
Reference in New Issue
Block a user