Qiang Yu
679c450184
util/blake3: add _mesa_blake3_from_printed_string
...
To convert printed blake3 string back to blake3 hash.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570 >
2024-12-16 07:35:06 +00:00
Alyssa Rosenzweig
13a4186c96
util/bitpack_helpers: make partially CL safe
...
add enough preprocessor guards that we can include this from CL and get basic
implementations of things. FIXED packs are missing due to llroundf (probably
fixable).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529 >
2024-12-12 21:16:12 +00:00
Samuel Pitoiset
c7a7f0244f
radv: add radv_lower_terminate_to_discard and enable for Indiana Jones
...
To workaround game bug.
This fixes the rendering issue with eyes.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32606 >
2024-12-12 19:54:39 +00:00
Hans-Kristian Arntzen
e815d6523c
radv: Add radv_invariant_geom=true for Indiana Jones.
...
Water puddles expect invariant position, but does not declare such in
the vertex shaders, leading to random glitches.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32607 >
2024-12-12 13:54:27 +00:00
Juan A. Suarez Romero
5b42da1be8
util/format: nr_channels is always <= 4
...
While the nr_channels is defined with 3 bits, which allows up to 7
channels, actually the number of channels is less or equal to 4.
This adds an assertion that helps static analyzers to avoid several
false positives related with this.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32589 >
2024-12-11 18:34:47 +00:00
Eric R. Smith
6f95870561
format: Add R8_G8B8_422_UNORM format
...
This is the format that drivers will want to use for NV16
without YUV conversion (if they support this natively).
Previously we had NV16 working but it was always emulated
with R8 + GR88.
Fixes: 440b69210a ("dri, mesa: fix NV16 texture format")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32524 >
2024-12-11 15:28:08 +00:00
Alyssa Rosenzweig
33d839a72a
util/printf: add context-ful helpers
...
drivers wishing to integrate driver CL printf/abort have to do some delicate
dances to maintain the data structure with the buffer size and abort flag. wrap
it all up in common helpers -- the driver just supplies the memory allocation
and calls in periodically.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564 >
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
85e06f5a55
util/printf: be robust against truncated buffers
...
this can happen with shader aborts. don't blow up with theatrics.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564 >
2024-12-10 19:13:07 +00:00
Tapani Pälli
03c9f164e8
drirc/anv: force_vk_vendor=-1 for Marvel Rivals
...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12280
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32555 >
2024-12-10 18:30:48 +00:00
Karmjit Mahil
3f18c91a0b
util/idalloc: Minor refactor of util_idalloc_foreach()
...
Changes the `for` loop code to be similar to
`util_idalloc_forach_no_zero_safe()` for cohesion.
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546 >
2024-12-10 08:29:00 +00:00
Karmjit Mahil
af346cd77f
util/idalloc: Fix util_idalloc_foreach() build issue
...
Currently `util_idalloc_foreach()` isn't being used in the codebase
but if used it causes a build error as `num_used` doesn't exist.
Fix that by using `num_set_elements`.
Fixes: 0589dfe4e2 ("util/idalloc: optimize foreach by tracking the greatest non-zero element")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546 >
2024-12-10 08:29:00 +00:00
Samuel Pitoiset
e3d1f27b31
radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle
...
Likely a game bug but can't be 100% sure because the game uses RT by
default and renderdoc still doesn't have support for it.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32528 >
2024-12-09 17:52:43 +00:00
Nanley Chery
483c40a21d
anv: Allow compressed memtypes with default buffer types
...
Source 2 games segfault if certain buffers are not able to use the same
memory types as images. CS2 specifically expects this to be the case for
vertex and index buffers (VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT,
VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT). I have not tested other Source 2
games to see how much the requirement differs for the usage (if at all).
Up until now, we've disabled CCS for the Source 2 engine with the
anv_disable_xe2_ccs driconf option. However, this option is not great
for performance. So, replace this with a new option to allow the same
memory types we use for images on buffers - anv_enable_buffer_comp.
Compression of buffers is generally not good for performance. I
collected the result of unconditionally enabling the feature in the
performance CI on BMG. I used the default configuration to average the
result of two runs of each trace.
The CI reports that 4 game traces would regress between 0.44-1.01% FPS
with buffer compression. However, the CI actually shows it to be
beneficial in three of our game traces:
* Cyberpunk-trace-dx12-1080p-high 106.51%
* Hitman3-trace-dx12-1080p-med 101.59%
* Blackops3-trace-dx11-1080p-high 100.44%
So, enable the option for the two games we already have driconf entries
for, Cyberpunk and Hitman3.
Of course, also enable the option for Source 2 games. Casey Bowman
reports that on BMG, some frame times drop from ~15ms to ~7ms in CS2.
This is in large part due to the removal of HiZ resolves, which is a
consequence of the game now using of HIZ_CCS_WT instead of plain HIZ.
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11520
Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32519 >
2024-12-06 17:21:06 +00:00
Friedrich Vock
c2f8f20ef7
radv,driconf: Apply DOOM Eternal/idTech workarounds for Indiana Jones
...
It's based on idTech and exhibits the same idTech bugs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32521 >
2024-12-06 09:21:17 +00:00
Samuel Pitoiset
6b671d4dab
radv: remove redundant drirc for incorrect dual-source blending
...
The pass that lowers PS outputs has been rewritten since 45d8cd037a
("ac/nir: rewrite ac_nir_lower_ps epilog to fix dual src blending
with mono PS") to handle invalid uses of dual-source blending.
This drirc used to workaround game bugs on GFX11 only should no longer
be necessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32514 >
2024-12-06 07:54:23 +00:00
Marek Olšák
16f7d22394
util/bitset: add BITSET_GET_RANGE_INSIDE_WORD
...
to be used later
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424 >
2024-12-04 13:40:41 +00:00
Marek Olšák
da3f9e3626
util/bitset_test: test the return value of BITSET_TEST_RANGE_INSIDE_WORD better
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424 >
2024-12-04 13:40:41 +00:00
Bas Nieuwenhuizen
0702c554de
util/perf: Fix some warnings.
...
Warnings about long unsigned vs. long long unsigned, so lets use the proper thing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32019 >
2024-12-02 15:15:52 +00:00
Caio Oliveira
a9acc0bea4
util/ra: Remove unimplemented function declaration
...
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32395 >
2024-11-28 19:19:26 +00:00
Marek Olšák
a3516dafc9
util,amd: add inlinable versions of drmIoctl/drmCommandWrite*
...
The reason for this is to inline those calls in drivers.
They are very trivial, so why not.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067 >
2024-11-26 00:16:02 -05:00
Eric R. Smith
1ea79ec164
egl, mesa: add support for NV15 and NV20 textures
...
Support external images with 10 bit YUV in NV15 and NV20 formats.
These are produced by some hardware decoders, so this will be
useful.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854 >
2024-11-25 13:04:19 +00:00
Eric R. Smith
440b69210a
dri, mesa: fix NV16 texture format
...
Support for NV16 was kind of half done, by declaring it to be
NV12. That didn't actually work though, so add some more stuff
to make it work.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854 >
2024-11-25 13:04:19 +00:00
Eric R. Smith
b6531e45ed
util: rename PIPE_FORMAT_Y8_U8V8_422_UNORM
...
Y8_U8V8_422_UNORM is more commonly known as NV16. There has been
a fourcc for NV16 for a while now, so let's rename it to be in
line with NV12 and similar formats.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854 >
2024-11-25 13:04:19 +00:00
Lionel Landwerlin
0fa3be44aa
anv: add a workaround for X4 Foundations
...
This title incorrectly tries to allocate descriptor sets larger than
the number of sampler items in the descriptor pool.
Workaround by taking other largest item count in the descriptor pool
and use that for samplers.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11795
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285 >
2024-11-22 06:44:34 +00:00
Georg Lehmann
12d026d679
util: add BITSET_LAST_BIT_BEFORE
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145 >
2024-11-21 14:50:45 +00:00
Juston Li
cbb3bb5c7b
util/cache_test: Fix racey Cache.List test
...
Instead of using unreliable polling to wait for foz db updater to parse
and load from the dynamic list, also use inotify to wait for foz db
updater close the list file after its done updating.
Fixes: 4dfd306454 ("disk_cache: Disable the "List" test for RO disk cache.")
Signed-off-by: Juston Li <justonli@google.com >
Reviewed-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32237 >
2024-11-21 02:11:32 +00:00
Alyssa Rosenzweig
847e0e78f8
util: add u_tristate data structure
...
rip the pan_tristate enum from panfrost and move it to common.
I've often wanted some sort of "yes/no/maybe" or "true/false/unknown" or
"always/never/sometimes" data structure. This adds a common one that is
hopefully neutral enough to cover all of the above.
Asahi will use this.
The Intel drivers could be ported to this (brw_sometimes/elk_sometimes), it
should be straightforward but I don't want to do that without being able to
easily test those changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224 >
2024-11-20 16:10:11 +00:00
Marek Olšák
23eb4f3454
nir: rename nir_io_glsl_opt_varyings to nir_io_dont_optimize and deprecate it
...
The meaning is negated.
This NIR option is deprecated and shouldn't be used. It means any IO
optimizations can be disabled and it's a currently a workaround for zink,
which is the only driver that asks for it by default. The original option
is replaced by an environment variable for the GLSL linker.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173 >
2024-11-19 23:48:38 +00:00
Samuel Pitoiset
2f13723c0a
radv: add a new drirc option to disable DCC for mips and enable it for RDR2
...
The game aliases two images. It binds a memory object to two different
images, the first one being an image with 4 mips and the second with
only one mip but the bind offset is incorrect. It's like it queried
the first image size with different usage flags, so that DCC was
disabled.
Force disabling DCC for mips fixes the incorrect rendering and doesn't
hurt performance.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10200
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32190 >
2024-11-19 07:39:13 +00:00
Manuel
217c17e8a2
gfxstream: Avoid repeated functionality
...
Removed a function that creates anonymous file descriptors when called.
Additionally replaced a call of said function with the one from the "util"
directory. The intention is to avoid repeated functionality
util: Allow code to be compatible in c++ compilers
Added an extern "C" statement and preprocessor directives to make the
“os_create_anonymous_file” function compatible with c++ compilers
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32096 >
2024-11-18 15:51:48 +00:00
Brad Smith
67333c2632
util: Support elf_aux_info() on OpenBSD arm and ppc
...
Signed-off-by: Brad Smith <brad@comstyle.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31102 >
2024-11-18 01:03:28 +00:00
Sam Lantinga
4ed8ef74b4
util: Fixed crash in HEVC encoding on 32-bit systems
...
This builds on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25059 , and extends that change to all 32-bit systems.
This fixes a crash on SteamOS with the following test case:
unsigned char data[] = {
0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x0c, 0x01, 0xff, 0xff, 0x01, 0x60,
0x00, 0x00, 0x03, 0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
0x99, 0x2c, 0x0c, 0x01, 0x64, 0x7c, 0x00, 0x7c, 0xd2, 0x56, 0x01, 0x40,
0x00, 0x00, 0x00, 0x01, 0x42, 0x01, 0x01, 0x01, 0x60, 0x00, 0x00, 0x03,
0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x99, 0xa0, 0x02,
0x80, 0x80, 0x32, 0x16, 0x24, 0xbb, 0x90, 0x84, 0x48, 0x9a, 0x83, 0x03,
0x03, 0x02, 0x00, 0xb2, 0x3e, 0x00, 0x3e, 0x69, 0x2b, 0x00, 0x5f, 0x08,
0x04, 0x10, 0x00, 0x00, 0x00, 0x01, 0x44, 0x01, 0xc0, 0x62, 0x0f, 0x02,
0x24
};
vlVaContext context;
vlVaBuffer buf;
memset(&context, 0, sizeof(context));
memset(&buf, 0, sizeof(buf));
context.packed_header_emulation_bytes = true;
buf.data = data;
buf.size = sizeof(data);
vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(&context, &buf);
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31596 >
2024-11-15 09:51:39 +00:00
Michel Dänzer
fdc1c61306
Revert "util: Use persistent array of index entries"
...
This reverts commit 031f2c2a69 .
It broke the macOS build.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12083
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078 >
2024-11-14 14:20:18 +00:00
Michel Dänzer
66d68263f8
Revert "util/mesa-db: Further simplify mesa_db_compact"
...
This reverts commit 92893309bc .
Need to revert this as well for the next revert.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078 >
2024-11-14 14:20:18 +00:00
David Heidelberg
962b996d4c
util: drop XOP detection code
...
Introduced in 2013 with prospect of being used in future.
... 11 years later.
Fixes: 4b45b61fef ("util: add avx2 and xop detection to cpu detection code") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Signed-off-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998 >
2024-11-13 23:33:15 +00:00
David Heidelberg
ca947e1295
util: Drop ancient Intel CPU detection
...
We don't use it for anything.
Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Signed-off-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998 >
2024-11-13 23:33:15 +00:00
David Heidelberg
a78c2bf2a4
util: Remove MMX/MMXext detection code
...
Currently pointless, Pentium II or Celeron and later has SSE.
Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Signed-off-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998 >
2024-11-13 23:33:15 +00:00
David Heidelberg
ae85e6920c
util: Drop 3Dnow optimisation leftovers
...
Fixes: a3218e65d1 ("mesa: remove long dead 3Dnow optimisation") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Signed-off-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998 >
2024-11-13 23:33:15 +00:00
Konstantin Seurer
01ca436263
util: Fix some brackets in util_dynarray_.*_ptr
...
Fixes a compiler error when directly accessing members of the returned
pointer.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509 >
2024-11-11 07:53:13 +00:00
Russell Greene
ae9d365686
perfetto: fix macos compile
...
On macos, <sys/types.h> does not declare clockid_t,
but it's instead in <time.h>, which also includes
<sys/types.h> on Linux, so just include <time.h> on
all UNIX platforms.
Fixes: a871eabc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12064
Tested-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31881 >
2024-11-09 09:23:22 +00:00
Gurchetan Singh
5d299a0bd4
util: add c++ guards to u_mm.h
...
Needed for gfxstream.
Reviewed-by: Marcin Radomski <dextero@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015 >
2024-11-08 08:09:49 -08:00
Pavel Ondračka
5480831e5e
r300: add driconf math mode override for Unigine Tropics and Oilrush
...
Fixes rendering in both apps. Specifically they want the ME_RECIP_FF
opcode. Figured out by Filip Gawin.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/332
Reviewed-by: Filip Gawin <filip@gawin.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31745 >
2024-11-06 21:10:21 +00:00
Pavel Ondračka
be595d0e52
r300: remove wrong Unigine Sanctuary driconf override
...
I used this for testing when adding r300 driconf support
and it was commited by mistake.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Reviewed-by: Filip Gawin <filip@gawin.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31745 >
2024-11-06 21:10:21 +00:00
Alyssa Rosenzweig
af2a796b13
util/ralloc: add total_size helper
...
It's useful to determine how much memory a nir_shader consumes for debugging
memory bloat, particularly for persistent NIR library. Add a helper that lets us
compute this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892 >
2024-10-30 12:59:10 +00:00
cheyang
122fd46b15
Android15 support gralloc IMapper5
...
In Android15 libui.so the vendor partition can access.
so use GraphicBufferMapper load mapper4 or mapper5.
still using U_GRALLOC_TYPE_GRALLOC4 because GraphicBufferMapper
load mapper5 fail will rollback loading mapper4
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11091
Signed-off-by: cheyang <cheyang@bytedance.com >
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31766 >
2024-10-29 12:32:04 +00:00
Samuel Pitoiset
9f8684359f
radv: implement VK_EXT_device_generated_commands
...
The major differences compared to the NV extensions are:
- support for the sequence index as push constants
- support for draw with count tokens (note that DrawID is zero for
normal draws)
- support for raytracing
- support for IES (only compute is supported for now)
- improved preprocessing support with the state command buffer param
The NV DGC extensions were only enabled for vkd3d-proton and it will
maintain both paths for a while, so they can be replaced by the EXT.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31383 >
2024-10-28 16:27:35 +00:00
Dmitry Osipenko
f76ed795de
util/cache_test: Add mesa-db test for adding cache entry bigger than empty cache
...
Add Mesa-DB regression test for a segfault bug that happened when a cache
entry bigger than size-limit of the cache is added to empty cache.
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988 >
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
5ec424c6be
util/mesa-db: Fix crash on compacting empty DB
...
Fix mesa_db_compact() segfaulting if compacted DB is empty. This crash
happens on writing cache entry that is bigger than DB's size limit and
when DB is empty, which can be triggered by setting DB size to a small
value.
Fixes: 32211788d0 ("util/disk_cache: Add new mesa-db cache type")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988 >
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
7b40d32187
util/mesa-db: Open DB files during access time
...
Open DB files when DB is accessed and close them afterwards to reduce
number of FDs used by multi-part DB cache.
Fixes: fd9f7b748e ("util/mesa-db: Introduce multipart mesa-db cache")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11776
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11810
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988 >
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
2a9378a0f9
util/mesa-db-multipart: Open one cache part at a time
...
Open one cache DB part at a time for a multi-part cache to reduce number
of FDs used by the cache. Previously multi-part DB cache instance was
consuming 100 FDs, now it's 2 and cache files are opened when cache
is read or written instead of opening them at the init time.
Fixes: fd9f7b748e ("util/mesa-db: Introduce multipart mesa-db cache")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11776
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988 >
2024-10-25 18:06:14 +00:00