mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 01:28:07 +02:00
gallium: fix alignment parameter passed to u_mmAllocMem()
Was 32, now 5. The param is expressed as a power of two exponent. The net effect is that the alignment was a no-op on X86 but on PPC we always got the same memory address everytime rtasm_exec_malloc() was called.
This commit is contained in:
parent
52e6fbb655
commit
8160cb4935
1 changed files with 2 additions and 2 deletions
|
|
@ -82,8 +82,8 @@ rtasm_exec_malloc(size_t size)
|
|||
init_heap();
|
||||
|
||||
if (exec_heap) {
|
||||
size = (size + 31) & ~31;
|
||||
block = mmAllocMem( exec_heap, size, 32, 0 );
|
||||
size = (size + 31) & ~31; /* next multiple of 32 bytes */
|
||||
block = u_mmAllocMem( exec_heap, size, 5, 0 ); /* 5 -> 32-byte alignment */
|
||||
}
|
||||
|
||||
if (block)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue