mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
asahi: Refuse to transfer out-of-bounds mip levels
Fixes ail asserts on a pile of dEQP3 tests. Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21063>
This commit is contained in:
parent
3706da1d1a
commit
a88aa3e835
1 changed files with 4 additions and 0 deletions
|
|
@ -742,6 +742,10 @@ agx_transfer_map(struct pipe_context *pctx, struct pipe_resource *resource,
|
|||
if ((usage & PIPE_MAP_DIRECTLY) && rsrc->modifier != DRM_FORMAT_MOD_LINEAR)
|
||||
return NULL;
|
||||
|
||||
/* Can't transfer out of bounds mip levels */
|
||||
if (level >= rsrc->layout.levels)
|
||||
return NULL;
|
||||
|
||||
agx_prepare_for_map(ctx, rsrc, level, usage, box);
|
||||
|
||||
struct agx_transfer *transfer = CALLOC_STRUCT(agx_transfer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue