mesa/src/freedreno/fdl
Zan Dobersek 1e27138588 freedreno/fdl: avoid overflow in layout size computations
When computing layout for large extents and array size, the computations
can overflow the 32-bit variables holding these values. This can end up
underreporting memory requirements for a given resource, making the
application think that such a resource is allocatable.

The size-holding variables in the fdl_layout struct have their type
upgraded to uint64_t, as does the total size variable in tu_image. This
avoids problems in corner-case tests in the Vulkan CTS, but this code
should be improved further to avoid overflows and narrowing conversions.

Fixes a quartet of tests under
dEQP-VK.pipeline.monolithic.render_to_image.core.2d_array.huge.width_height_layers.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28050>
2024-03-20 17:05:55 +00:00
..
fd5_layout.c freedreno/fdl: avoid overflow in layout size computations 2024-03-20 17:05:55 +00:00
fd5_layout_test.c
fd6_format_table.c freedreno/fdl: Support PIPE_FORMAT_R5G5B5A1_UNORM on a6xx 2023-09-27 19:07:22 +00:00
fd6_format_table.h freedreno: c++-proofing 2023-03-13 17:31:22 +00:00
fd6_layout.c freedreno/fdl: avoid overflow in layout size computations 2024-03-20 17:05:55 +00:00
fd6_layout_test.c freedreno/a6xx: Fix a bunch of 3D texture layout to match blob behavior. 2021-11-15 22:25:08 +00:00
fd6_view.c freedreno/fdl: Use A8_UNORM HW format for sampling 2023-09-27 19:07:22 +00:00
fd_layout_test.c freedreno/cffdump: Handle the TILE_ALL flag in unit test generation. 2021-11-15 22:25:08 +00:00
fd_layout_test.h freedreno/cffdump: Handle the TILE_ALL flag in unit test generation. 2021-11-15 22:25:08 +00:00
freedreno_layout.c freedreno/fdl: avoid overflow in layout size computations 2024-03-20 17:05:55 +00:00
freedreno_layout.h freedreno/fdl: avoid overflow in layout size computations 2024-03-20 17:05:55 +00:00
meson.build freedreno: decouple compiler and vulkan driver from gallium 2023-08-03 07:29:36 +00:00