1880e7cfed
We need to allocate "shared size" bytes for each workgroup but we were incorrectly multiplying by the number of workgroups in each supergroup instead, which would typically cause us to allocate less memory than actually required. The reason this issue was not visible until now is that the kernel driver is using a large page alignment on all BO allocations and this causes us to "waste" a lot of memory after each allocation. Incidentally, this wasted memory ensured that out of bounds accesses would not cause issues since they would typically land in unused memory regions in between aligned allocations, however, experimenting with reduced memory aligments raised the issue, which manifested with the UE4 Shooter demo as a GPU hang caused by corrupted state from out of bounds memory writes to CS shared memory. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27675>