mesa/src
Caio Oliveira 0b5abf2512 spirv: Use value_id_bound to set initial memory allocated
Don't rely on the current default (which is 2048 bytes) buffer size for
blocks -- which ends up being too small for most shaders.  Since we
already rely on value_id_bound to allocate an array of vtn_value, use
that to estimate a better value.

In addition to space for the array, we approximate the extra size of
extra data structures with the size of vtn_ssa_value, and skip it to the
next size (double it) to cover the CFG related allocations.  This
results in only single system allocation necessary to back the temporary
data for the majority of the shaders.

Parsing code was slightly reordered so we can validate and read the
value_id_bound before the temporary allocator is created.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25279>
2024-01-02 16:07:06 +00:00
..
amd ac/surface: don't oversize surf_size 2024-01-02 14:32:05 +01:00
android_stub
asahi treewide: Replace the include of nir_types.h with glsl_types.h 2023-12-30 15:08:11 +00:00
broadcom ci/v3dv: update results 2024-01-02 10:23:24 +01:00
c11
compiler spirv: Use value_id_bound to set initial memory allocated 2024-01-02 16:07:06 +00:00
drm-shim compiler,vulkan,drm-shim: Remove unused include directories from meson.build 2023-10-27 01:35:10 +00:00
egl egl/glx: fallback to software when Zink is forced and fails 2023-12-19 11:59:49 +00:00
etnaviv ci/austriancoder: separate HW definition from SW 2023-12-16 16:03:08 +01:00
freedreno nir: Optimize fpow with small constant exponents 2024-01-02 11:16:14 +01:00
gallium zink/requirements: update feature and property names that have been promoted 2024-01-02 15:49:41 +00:00
gbm gbm: delete some zink handling 2023-10-09 18:43:09 +00:00
getopt
glx glx: Handle IGNORE_GLX_SWAP_METHOD_OML regardless of GLX_USE_APPLEGL 2023-12-18 17:52:09 +00:00
gtest gtest: backport ansi color fix 2023-08-18 21:33:14 +00:00
imagination pvr: alloc WSI memory via GPU when there isn't a valid display FD 2023-12-12 12:41:13 +00:00
imgui
intel intel/cmat: Generate better code for nir_intrinsic_cmat_insert 2023-12-29 20:28:54 -08:00
loader dri: added build dependencies for systems using non-standard prefixed X11 libs. 2023-11-02 15:08:17 +00:00
mapi glthread: add a string table of function names 2023-12-08 04:25:52 +00:00
mesa mesa: Use glsl_type C helpers 2023-12-22 06:44:23 -08:00
microsoft treewide: Replace the include of nir_types.h with glsl_types.h 2023-12-30 15:08:11 +00:00
nouveau nouveau: Use glsl_type C helpers 2023-12-22 06:44:23 -08:00
panfrost treewide: Replace the include of nir_types.h with glsl_types.h 2023-12-30 15:08:11 +00:00
tool perfetto/pps-producer: add optimized cpu/gpu timestamp correlation support 2023-11-09 13:22:48 +00:00
util util: Add a way to set the min_buffer_size in linear_alloc 2024-01-02 16:07:06 +00:00
virtio vulkan/android: Only limit advertised extensions in strict mode 2023-12-13 20:09:37 +00:00
vulkan vulkan: add wrappers for descriptor '2' functions 2024-01-02 11:28:07 +00:00
.clang-format nir: add _safe variants of nir_foreach_reg_load/store 2023-12-15 17:19:28 +00:00
meson.build meson: Only include virtio when DRM available 2023-11-07 18:22:56 +00:00