Commit Graph

197836 Commits

Author SHA1 Message Date
Marek Olšák
ef4342e3c3 radeonsi/ci: add options to test llvmpipe, softpipe, virgl, zink
for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
51aa1d8381 radeonsi: fix gl_FrontFace elimination when one side is culled
Fixes: 55d81214c9 - radeonsi: replace gl_FrontFacing with a constant if one side is always culled

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
48c1c6247c radeonsi: handle nir_intrinsic_component in kill_ps_outputs
The assertion was failing with AMD_DEBUG=mono.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5be9d76861 radeonsi: fix an assertion failure in si_shader_ps with AMD_DEBUG=mono
assert(!shader->key.ps.part.prolog.force_persp_center_interp ||
       (!G_0286CC_PERSP_SAMPLE_ENA(input_ena) && !G_0286CC_PERSP_CENTROID_ENA(input_ena)));
failed when all FS inputs have been eliminated by optimizations, which
causes LLVM to set PERSP_SAMPLE_ENA because at least 1 of those must be
enabled, which this code didn't expect.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5b09aaf44d radeonsi: fix buffer_size for emulated GS statistics
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Mary Guillemard
1fc454673a panvk: Implement VK_EXT_sampler_filter_minmax for v10
This is supported by the hardware since v10.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32215>
2024-11-19 11:55:05 +01:00
Caterina Shablia
a5bcf566a9 nir: lower INSTANCE_{ID,INDEX} to an offset load_instance_{index,id} respectively
If the hardware does not support INSTANCE_INDEX natively, it will be
lowered to load_instance_id + base_instance. Otherwise, INSTANCE_ID
will be lowered to load_instance_index - base_instance.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32158>
2024-11-19 09:18:47 +00:00
Caterina Shablia
b9be1f1f20 nir: introduce instance_index system value
The semantics of this newly introduced system value match
Vulkan's InstanceIndex exactly, and are equivalent to
instance_id + base_instance.

Some hardware, such as Mali Valhall or later, only provides
instance id offset by base_instance. Introducing a new system
value to represent this, rather than handling the mismatch
when lowering to BIR lets us use NIR to eliminate redundant
arithmetic that would follow from mismatched semantics, e.g.
instance_id could be lowered to instance_index - base_instance,
so expressions such as instance_id + base_instance would be
optimized to a simple instance_index.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32158>
2024-11-19 09:18:47 +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
Samuel Pitoiset
2e51d0c724 radv: add a helper to destroy a logical device
It's less error prone than duplicating every cleanups with a bunch of
gotos.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Samuel Pitoiset
2181ddf383 radv: destroy meta resources properly when creating the device failed
Better to call radv_device_finish_meta().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Caio Oliveira
0b66cb1f82 intel/brw: Allow extra SWSB encodings for Xe2
There are new combinations of ordered and unordered dependencies
available for the instructions to use, which among others include:

- combining FLOAT and INT pipe deps in SENDs;
- combining SRC mode deps in regular instructions for the inferred type.

This patch enables a couple of tests checking for the first case.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Caio Oliveira
1b13eea642 intel/brw: Add test for combining SWSB dependencies in SENDs
These are currently DISABLED_ since they fail.  A later patch will
enable them.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Dave Airlie
6714689613 nir/functions: force inlining for barriers.
A recent algebraic opt made a function that used to inline
with llvmpipe CL not inline anymore. However that function
has a barrier in it.

Handling barriers from inside a callstack is hard for llvmpipe
coroutines, so just force functions with barriers to be inlined.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32204>
2024-11-19 12:26:28 +10:00
Aaron Ruby
4614097756 meson: Remove experimental from gfxstream driver build
We (QNX) is using this with our VMM, and our Linux reference distro (which is currently in development).
With libaemu removed, it's much easier to integrate into a Linux-guest
build.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32161>
2024-11-19 00:42:52 +00:00
Chia-I Wu
0fb4609d94 panvk: add support for VK_EXT_queue_family_foreign
We can treat VK_QUEUE_FAMILY_FOREIGN_EXT as the host,  This makes sure
that, on release, all subqueues self-wait and all caches are flushed.
On acquire, all caches are invalidated.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
715d6e740a panvk: improve VK_QUEUE_FAMILY_EXTERNAL support
The spec says that the user-specified srcStageMask/srcAccessMask should
be ignored for the acquire operation and the user-specified
dstStageMask/dstAccessMask should be ignored for the release operation.

Since we don't need any special handling for VK_QUEUE_FAMILY_EXTERNAL,
override them to NONE.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
9e90e50362 panvk: add normalize_dependency
It normalizes the stage and access masks of a barrier.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
LingMan
0f47e362a6 rusticl: Use C-string literals for DiskCache::new
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
85aaeb4bf8 rusticl: Use C-string literals for NirShader::add_var
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
b9ccee0071 rusticl/core: Use C-string literals for XPlatManager::get_proc_address_func
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
fab6fa2bc8 rusticl/cl_prop: Use C-string literals
Avoids some pointless allocations when converting `&str` to `&CStr`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
7ac2846c96 rusticl: Use C-string literals for spirv extension names
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
612ad0cb70 rusticl: Use C-string literals
They got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
62b8e053f7 mesa: Add rustfmt.toml
Unless rustfmt gets informed that we use the 2021 edition, it chokes on
C-string literals.

Passing the `--edition` parameter with every invocation would be annoying.
Create a config file instead.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
0ff3e2a0f9 compiler/rust: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
190fbbe1d6 nak/hw_test: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
718407e806 mesa: Bump required Rust version to 1.78
The Linux kernel requires Rust 1.78 since version 6.10. Thus, this update is
in line with our Rust update policy.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
Michel Zou
795a36325a ac/gpu_info: Fix missing prototype mingw error
Fixes: 246051ebc6 ("ac/gpu_info: print 32bpp modifiers")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Closes #8858

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32177>
2024-11-18 21:49:24 +00:00
Vldly
6d14cad330 freedreno: Fix resource tracking on repeated map with discard
In two functions implementing resource discard rebind_resource is called
on resource before its track record is reset. This prevents update of
dirty_resource or dirty_shader_resource because of conditions in
needs_dirty_resource. With rsc->track reset and dirty_resource bits
missing further calls to transfer_map will not try to reallocate
resource storage when needed.

A way to reproduce the issue in both functions is by executing at least
3 draws modifying bound texture or VBO each time. This patch fixes those
cases and some related piglit tests on a5xx and should fix it on other
GPUs. Also it fixes rendering in Firefox and vsraytrace (except vertical
line at right edge).

Fixes: 0a62a874fc ("freedreno: Re-work dirty-resource tracking")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10374
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32167>
2024-11-18 21:17:50 +00:00
Jordan Justen
eb10dc2e73 intel/dev: Add PTL 0xb0b0 PCI ID
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32149>
2024-11-18 20:53:06 +00:00
Job Noorman
554494e2cd ir3,tu: filter debug flags included in the hash key
Only include debug flags that have an influence on codegen.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
Job Noorman
d8c90806e4 ir3,tu: include ir3 debug flags in shader hash key
Many debug flags influence shader codegen but are currently not included
in the hash key. This causes surprising effects as cache lookups may
return shaders compiled with different debug flags than currently in
effect. This patch fixes this by including all debug flags  in the
shader hash key.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
David Rosca
4ec43c59da radeonsi/vcn: Use correct frame context buffer for preencode on VCN5
Fixes: 3c5fe03b92 ("radeonsi/vcn: Add support for VCN5 dpb tier2")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31985>
2024-11-18 19:41:05 +00:00
Karol Herbst
c0edb9344f rusticl: enable cl_khr_depth_images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
67212c2fa6 rusticl/device: advertize cl_khr_depth_images if supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
2aec563acf rusticl/image: fix clEnqueueFillImage for CL_DEPTH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
2acfb55dfb rusticl/mem: add restrictions for CL_DEPTH, CL_DEPTH_STENCIL and msaa images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
fa379a9495 nir/lower_cl_images: lower scalar image_loads to vec4
This will be required for supporting depth images as the rest of mesa assumes those
to always return vec4.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Gurchetan Singh
b805e23f40 gfxstream: change output location
Change the output location for codegen to guest/vulkan_enc.
This is only run by AOSP devs, so it won't affect upstream.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
214dee0447 gfxstream: for Android, look for the autogenerated files
This is mostly a developer preference issue.  Some Android
devs like to commit auto-generated files for ${reasons},
though the style of Mesa is not to do so.

I personally like the Mesa style, since otherwise a 25 million
LoC project would be 40 million, but whatever.

An easy solution to just to check them in AOSP Mesa, but not
in upstream.  There are various mechanisms, particularly
auto-rollers, that enable this.  For example, there is no plan to
check in Blueprint files upstream, but they will be checked-in
and committed by the auto-roller.

For the scheme to work, we'll need slightly different meson
rules when the build target is Android versus otherwise.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
7c219ae7e0 gfxstream: delete qemu_pipe target
It has no sources..

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
9a1654f5ce gfxstream: conditionals for using gfxstream::aemu
It's a guest-only build target, and shouldn't be on the host.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Joshua Duong
04f5bfaee6 gfxstream: update auto-generated comments.
gfxstream-protocols/scripts/generate-vulkan-sources.sh ==>
mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
cd8b4d730b gfxstream: snapshot: DescriptorSet allocate and update
When batched descriptorset udpate optimization is turned
off, the descriptorset is not handled in snapshot.
This cl handles this situation.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
94b906ae44 gfxstream: snapshot: avoid double boxing dispatchable handle
For dispatchable handle, such as commandBuffer, it is always
left as boxed by decoder; consequently snapshoter should not
box it again.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Lionel Landwerlin
8845255881 anv: fix missing push constant reallocation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 62d96a6546 ("anv: add dirty tracking for push constant data")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12151
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30007>
2024-11-18 16:31:33 +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
Nanley Chery
f1724b44d0 anv: Drop fast-clear value conversion check
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5622
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Nanley Chery
93e42f9700 anv: Store fast-clear colors with the view swizzle
Prevents the next patch from failing CTS tests such as:

   dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4*

Brings back the feature that was introduced in commit 46187bb54f
("anv: Swizzle fast-clear values"), but went unused in commit
721d0c3e77 ("anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR").

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00