Because s_sendmsg dealloc_vgprs waits for every counter except vs_count,
and the message bus has limited throughput, we should only insert the dealloc
when we know that it's beneficial.
Foz-DB Navi31:
Totals from 5280 (6.58% of 80273) affected shaders:
Instrs: 4186851 -> 4197416 (+0.25%)
CodeSize: 21910004 -> 21952264 (+0.19%)
Latency: 31679067 -> 31679173 (+0.00%)
InvThroughput: 9182625 -> 9183417 (+0.01%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37508>
Move tfu_supports_tex_format(),
get_internal_type_bpp_for_output_format(), v3d_get_tex_format(),
and v3d_get_rt_format() from v3dx_context.h into
a new header, v3dx_format_table.h.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36858>
Turns out just putting the u32 in doesn't work on big endian, so
put the proper u8/u16 values in.
Got a report that since the loop limiter got removed, a gtk4 blur
shader was looping forever on s390x. Turns out it was using a 16-bit
loop variable (because why wouldn't you), and the loop counter was
just staying at 0 all the time.
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37593>
os_get_option() is a wrapper for getenv() that checks properties in
Android. It should be a no-op for other OS but will allow full use of
env vars in Android.
The environment variable names are automatically renamed by
os_get_option() and the order of precedence thus becomes:
1. getenv (non-Android)
2. debug.mesa.* (Android)
3. vendor.mesa.* (Android)
4. mesa.* (Android, as a fallback for older versions)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37587>
This is notably required by Wayland compositors with a Vulkan renderer.
This implementation exposes the primary (cardN) node of the render
device as its the primary node, as the preferred way of implementing
this in Mesa.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25431>
After commit 45eb3bfd32 (device-select: only try wayland/x11 if the
required vars are set, 2024-10-18), building `device_select_layer.c` can
results in compiler errors on some stricter build configurations
(-Werror,-Wunused-variable):
-----------------------------------------------------------------------
../src/vulkan/device-select-layer/device_select_layer.c:149:9: error: unused variable 'has_wayland' [-Werror,-Wunused-variable]
149 | bool has_wayland = getenv("WAYLAND_DISPLAY") || getenv("WAYLAND_SOCKET");
| ^~~~~~~~~~~
../src/vulkan/device-select-layer/device_select_layer.c:150:9: error: unused variable 'has_xcb' [-Werror,-Wunused-variable]
150 | bool has_xcb = !!getenv("DISPLAY");
| ^~~~~~~
2 errors generated.
-----------------------------------------------------------------------
So guard the declarations of the `has_wayland` and `has_xcb` variables
behind `VK_USE_PLATFORM_WAYLAND_KHR` and `VK_USE_PLATFORM_XCB_KHR`
respectively, just like the user code.
Note: the declarations are still kept outside of the loop body, in order
to assign the variables once and for all.
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37571>
Fixes a crash during startup because `build_id_find_nhdr_for_addr`
returns null. Besides that, using the compiler cache is meaningless for
computerator.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37572>
This replaces u_upload_data_ref with u_upload_data.
No effect since TC ensures we don't get user buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37566>
Instead of calling self to bind NULL on user buffer upload failure,
upload sooner and set input = NULL on failure.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37566>
It was decrementing and then incrementing the refcount in that case.
If buffers->buffers[slot] == buffer, there are no atomics.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37566>
RMV only supports logging three types of query pools as created resources.
Filtering unsupported ones will avoid asserts when these tokens are
processed during RMV trace output.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37560>
The current code was conditionally passing empty streamout targets to
util_blitter_save_so_targets() only when ETNA_DBG_DEQP was enabled.
Since etnaviv supports hardware streamout on some GPUs, we should
always pass the actual streamout state to properly save and restore
it during blitter operations.
Fixes: 52bc3c2d20 ("etnaviv: Implement stream output target management")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37564>
Not a whole lot of applications supports Vulkan 1.0, so let's wire up
support for MESA_VK_VERSION_OVERRIDE so we can easily override the
version when testing.
While we're at it, let's switch to VK_MAKE_API_VERSION, as
VK_MAKE_VERSION is deprecated now.
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37556>
These bits aren't about the API version supported, but the version of
the loader interface supported. We support Vulkan 1.4 in that regard,
so let's report that.
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37556>
The JM backend logic is not ready for that yet.
Fixes: f04dbf0bc0 ("pan/kmod: query and cache available context priorities from KMD")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37480>
panvk_draw_prepare_attributes() depends on VS descriptors sets being
up-to-date which implies calling cmd_prepare_shader_desc_tables()
before. panvk_draw_prepare_vs_copy_desc_job() depends on img_attrib_table,
which can be set in panvk_draw_prepare_vs_attributes().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37501>
This changes debug_archiver to create files inside a directory named
after the archive filename (e.g., "debug.anv.mda/") instead of the
hardcoded "mda/" directory. This prevents conflicts if multiple
mda.tar files are extracted in the same location.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29146>
Will allow generate anv.tar with unique "first directory name" instead
of always "mda/", avoiding overlaps if user untars the files. The name
still must end with "mda/".
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29146>
Allow archives to have interleaved entries where different object
versions don't appear together. This gives more flexibility to the
drivers when producing the mda.tar files.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29146>
Make more ergonomic to use the common unified and side-by-side diffs,
and also optionally set the context lines (for -U) and the width (for -Y).
This should cover most common cases. MDA_DIFF_COMMAND is still available
for full control.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29146>
The debug archive files are regular tar files, so can be
inspected by tar, and also used direct by file managers and editors.
However a few common tasks are worth having already set up in the
repository.
This tool adds convenience to some of those tasks, including
- Print last version of a shader representation;
- Print a `git-log`-like view of the changes of a shader;
- Comparing two shaders, e.g. SIMD8 and SIMD16 shaders in
Intel;
- Comparing two specific versions of any shaders.
See the "manual" inside the commit for more details.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29146>