We can just place the set structures inside nir_block.
This reduces the number of ralloc calls by 6.7% when compiling Heaven
shaders with radeonsi+ACO using a release build (i.e. not including
nir_validate set allocations, which are also removed).
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
This is only 1% of all ralloc calls of Unigine Heaven with the gallium noop
driver, but it's an easy one to get rid of.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
86% of all ralloc calls for dom_children in Unigine Heaven + Superposition
had size == 0. It was only allocating the ralloc header.
It was 6.1% of all ralloc calls with the gallium noop driver.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
We can use _mesa_hash_table_init instead of _mesa_hash_table_create.
It doesn't have to be allocated.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
it always returns true because it no longer allocates anything
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
When compiling Heaven shaders with radeonsi+ACO, this reduces the total
number of ralloc calls by 10.8% (same number as the sets, which also reduced
it by 10.8%). Apparently we like to create a lot of hash tables.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
_mesa_hash_table_init & _mesa_hash_table_fini (and equivalents) is
the preferred way to set up hash tables.
This adds missing "init" and "fini" functions.
_mesa_string_hash_table_create is also changed to non-inline.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
it always returns true because it no longer allocates anything
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
When compiling Heaven shaders with radeonsi+ACO, this reduces the total
number of ralloc calls by 10.8%. _mesa_set_init was the biggest user
of ralloc (rzalloc_array) during shader compilation.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
The set can be used without allocating the "set" structure, so let's
add missing init and fini functions.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36728>
We were not implementing vkGetImageOpaqueCaptureDescriptorDataEXT,
relying on the common implementation that does nothing. That works well
enough for regular images because the fixed address needed for
capture/replay is handled by the memory allocation path, but for sparse
images we initialize the sparse bindings at image creation time.
Here we implement the function to retrieve the addresses of all the
used bindings for the image, then use all of them at creation time.
Also, set the correct alloc_flags for this to work.
Fixes: 43b57ee8a5 ("anv: add capture/replay support for image with descriptor buffers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35872>
which was deprecated in 0.47. This doesn't change behavior, just shuts
up warnings.
meson.build:105: WARNING: Project targets '>= 1.4.0' but uses feature deprecated since '0.47.0': build_always arg in custom_target. combine build_by_default and build_always_stale instead.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36891>
../../src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp:86:22: warning: comparison of integer expressions of different signedness: 'int' and 'const uint32_t' {aka 'const unsigned int'} [-Wsign-compare]
86 | for (int i = 0; i < num_buffers; ++i) {
| ~~^~~~~~~~~~~~~
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36864>
Replace
for (int i = 0;
=>
for (size_t i = 0;
warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<unsigned int, std::allocator<unsigned int> >::size_type' {aka 'long long unsigned int'} [-Wsign-compare]
929 | for (int i = 0; i < output.size(); ++i)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36864>