mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
asahi: return GL_OOM for excessive image sizes
fixes piglit max-texture-size Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
parent
fd91d46487
commit
f82264fec0
1 changed files with 6 additions and 0 deletions
|
|
@ -567,6 +567,12 @@ agx_resource_create_with_modifiers(struct pipe_screen *screen,
|
|||
|
||||
ail_make_miptree(&nresource->layout);
|
||||
|
||||
/* Fail Piglit's obnoxious allocations */
|
||||
if (nresource->layout.size_B >= (1ull << 32)) {
|
||||
free(nresource);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (templ->target == PIPE_BUFFER) {
|
||||
assert(nresource->layout.tiling == AIL_TILING_LINEAR);
|
||||
util_range_init(&nresource->valid_buffer_range);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue