gallium: refuse to create buffers larger than UINT32_MAX
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 5 Dec 2019 09:07:52 +0000 (10:07 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 16 Dec 2019 08:30:14 +0000 (09:30 +0100)
commit2c1983aefeb6dacfbc61f9edd71975ea359fae40
treeb8d60abe4d33644f75bb3533c3755d586a28db2b
parent0e286f6cbf34206e0f243895e9b125ae1d08ca75
gallium: refuse to create buffers larger than UINT32_MAX

pipe_resource.width0 is 32 bits and hardware support for bigger buffer is
limited (eg: AMD hardware doesn't support buffer shader resources bigger
than 4GB).

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2053
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948>
src/mesa/state_tracker/st_cb_bufferobjects.c