v3dv: ensure at least V3D_CL_MAX_INSTR_SIZE bytes in last CL instruction
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 6 Feb 2023 12:16:12 +0000 (13:16 +0100)
committerEric Engestrom <eric@engestrom.ch>
Wed, 8 Feb 2023 20:34:45 +0000 (20:34 +0000)
commit1e65762031071b0cd0fd740d5a0c808a237d3896
tree97077dce7924ba869a007512ca9d24c546f0ea4a
parent9d4413d65f25279c8d0f0846322a4eae772a8bc3
v3dv: ensure at least V3D_CL_MAX_INSTR_SIZE bytes in last CL instruction

The CLE parser in the sim will read this many bytes for each instruction
in a CL, so we should ensure we have at least that many bytes available
in the BO when reading the last instruction, otherwise we can trigger
a GMP violation. It is not clear whether this behavior applies to real
hardware too.

cc: mesa-stable

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21162>
(cherry picked from commit c2601f06908434aaddd6b1db5e995bbda22d2a72)
.pick_status.json
src/broadcom/common/v3d_limits.h
src/broadcom/vulkan/v3dv_cl.c