v3d: mark mapped BO as initialized for valgrind
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When we unsychronized map a BO, we tell Valgrind that the content is not
initialized yet.

But we forgot to mark it as defined when the map finishes, which leads to
several conditional jump or move depends on uninitialised value(s)
warnings when using Valgrind.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40964>
This commit is contained in:
Juan A. Suarez Romero 2026-04-14 23:50:01 +02:00 committed by Marge Bot
parent 477c44ba93
commit 69708ff3f5

View file

@ -537,6 +537,7 @@ v3d_bo_map(struct v3d_bo *bo)
mesa_loge("BO wait for map failed");
abort();
}
VG(VALGRIND_MAKE_MEM_DEFINED(map, bo->size));
return map;
}