mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 08:30:10 +01:00
gallium: Weaken assertion about u_mm's align2 field.
vc5 MMU mappings are access-controlled at a 128kb boundary, so the 4kb here was too small for that purpose. Allowing any valid align2 value that u_mm's 32-bit addressing can represent will still catch most cases of people passing in a byte alignment. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
bb7c9789c2
commit
6cc59de9cd
1 changed files with 4 additions and 1 deletions
|
|
@ -183,7 +183,10 @@ u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
|
|||
|
||||
assert(size >= 0);
|
||||
assert(align2 >= 0);
|
||||
assert(align2 <= 12); /* sanity check, 2^12 (4KB) enough? */
|
||||
/* Make sure that a byte alignment isn't getting passed for our
|
||||
* power-of-two alignment arg.
|
||||
*/
|
||||
assert(align2 < 32);
|
||||
|
||||
if (!heap || align2 < 0 || size <= 0)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue