From ef893db468c60e1ab57ba5fa1677b3d34f09833e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 3 Dec 2019 13:51:55 -0800 Subject: [PATCH] main: Change u_mmAllocMem align2 from bytes (old API) to bits (new API) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Tested-by: Clayton Craft --- src/mesa/main/execmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c index 8c7325bebf3..35d4574ba2b 100644 --- a/src/mesa/main/execmem.c +++ b/src/mesa/main/execmem.c @@ -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) -- 2.30.2