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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user