main: Change u_mmAllocMem align2 from bytes (old API) to bits (new API)
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 3 Dec 2019 21:51:55 +0000 (13:51 -0800)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 5 Dec 2019 20:07:09 +0000 (21:07 +0100)
The main and Gallium implementations were recently merged, and the
align2 parameter in the Gallium one is in bits.  execmem.c expected
bytes still.  This led to every call here asserting.

Fixes: b6fd679a9e("mesa/main/util: moving gallium u_mm to util, remove main/mm")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
src/mesa/main/execmem.c

index 8c7325bebf33b60878ea25ed05aef251a3392c4c..35d4574ba2bdc8c4e48e0d9a1fe4daa5253a8d83 100644 (file)
@@ -101,7 +101,7 @@ _mesa_exec_malloc(GLuint size)
 
    if (exec_heap) {
       size = (size + 31) & ~31;
-      block = u_mmAllocMem( exec_heap, size, 32, 0 );
+      block = u_mmAllocMem(exec_heap, size, 5, 0);
    }
 
    if (block)