Commit Graph

192484 Commits

Author SHA1 Message Date
Karol Herbst
b58390bca2 rusticl: use blob for all serialization
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
dc896c31f9 rusticl/program: move attribute_str to the spirv module
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
fcdf27de6b rusticl/kernel: move setting of nir metadata into lower_and_optimize_nir
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
629d6fc124 rusticl/kernel: make some types and fields private
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
3442db4106 rusticl: move more kernel related things into kernel.rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Christian Gmeiner
c33d2db06a meson: Add missing inc's to idep_nir_headers
nir.h includes:
 - "compiler/glsl_types.h" -> inc_src is needed
 - "util/u_atomic.h" -> "no_extern_c.h" -> inc_include needed

This makes it possible to use rust's bindgen with only nir.h
as specified include.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30359>
2024-07-25 05:51:19 +00:00
David Heidelberg
5f7eb8cff6 freedreno: support lua pkgconfig variants
Distributions have different naming styles, detect all of them.

Example from Alpine / postmarketOS:
Run-time dependency lua54 found: NO (tried pkgconfig and cmake)
Run-time dependency lua5.4 found: YES 5.4.7

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30352>
2024-07-25 05:38:06 +00:00
Dave Airlie
76ae27efb3 llvmpipe/cs/orcjit: add stub function name for coro
This fixes some debug
JIT session error: Unexpected definitions in module : [ cs_co_variant ]
Failed to materialize symbols: { (cs0_variant0_3, { cs_variant }) }

Fixes: bb0efdd4d8 ("llvmpipe: add shader cache support for ORCJIT implementation")
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30335>
2024-07-25 00:26:46 +00:00
Dave Airlie
fcf9e33ec0 draw/orcjit: supply stub function for tcs coro
This fixes a crash with shader cache enabled:
JIT session error: Unexpected definitions in module : [ draw_llvm_tcs_coro_variant ]
Failed to materialize symbols: { (draw_llvm_tcs_variant0_7, { draw_llvm_tcs_variant }) }

Fixes: bb0efdd4d8 ("llvmpipe: add shader cache support for ORCJIT implementation")
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30335>
2024-07-25 00:26:46 +00:00
Mike Blumenkrantz
ec7afd2c24 dril: rework config creation
the original implementation of config selection had a number of flaws:
* using eglChooseConfigs with lots of loops, which was okay for filtering but
  also added considerable complexity and made it difficult to correctly
  get all the configs
* not adding enough configs; there were a lot more color and zs formats
  which weren't in the base config list
* double buffer configs were never created
* srgb configs were also never created

there will now be fewer configs than there were pre-DRIL, but this is only
because accum buffers are now gone and not because anything of value is
missing

Fixes: 3de62b2f9a ("gallium/dril: Compatibility stub for the legacy DRI loader interface")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30311>
2024-07-24 23:42:05 +00:00
Paulo Zanoni
dd5362c78a anv/xe: try harder when the vm_bind ioctl fails
From all the many possible errors returned by the vm_bind ioctl, some
can actually happen in the wild when the system is under memory
pressure. Thomas Hellström pointed to us that, due to its asynchronous
nature, the vm_bind ioctl itself has to pin some memory, so if the
number of bind operations passed is too big, there is a probability
that it may run out of memory.

Previously the Kernel would return ENOMEM when this condition
happened.  Since commit e8babb280b5e ("drm/xe: Convert multiple bind
ops into single job") the Kernel has started returning ENOBUFS when it
doesn't have enough memory to do what it wants but thinks we'd succeed
if we tried to do one bind operation at a time (instead of doing
multiple operations in the same ioctl), and ENOMEM in some other
situations. Still-uncommitted commit "drm/xe: Return -ENOBUFS if a
kmalloc fails which is tied to an array of binds" proposes converting
a few more ENOMEM cases no ENOBUFS.

Still, even ENOMEM situations could in theory be possible to recover
from, because if we wait some amount of time, resources that may have
been consuming memory could end up being freed by other threads or
processes, allowing the operations to succeed. So our main idea in
this patch is that we treat both ENOMEM and ENOBUFS in the same way,
so our implementation can work with any xe.ko driver regardless of
having or not having the commits mentioned above.

So in this patch, when we detect the system is under memory pressure
(i.e., the vm_bind() function returns VK_ERROR_OUT_OF_HOST_MEMORY), we
throw away our performance expectations and try to go slowly and
steady. First we wait everything we're supposed to wait (hoping that
this alone could also help to alleviate the memory pressure), and then
we synchronously bind one piece at a time (as this will ensure ENOBUFS
can't be returned), hoping that this won't cause the Kernel to try to
reserve too much memory. All this while also hoping that whatever
thing that may be eating all the memory goes away in the meantime. If
even this fails, we give up and hope the upper layer will be able to
figure out what to do.

This fixes a bunch of LNL failures and flaky tests (as LNL is our
first officially supported xe.ko platform). This can be seen in dEQP
but only if multiple tests are being run parallel. Happens in multiple
tests, some of which may include:

  - dEQP-VK.sparse_resources.image_sparse_binding.2d_array.rgba8_snorm.1024_128_8
  - dEQP-VK.sparse_resources.image_sparse_binding.3d.rgba16_snorm.1024_128_8
  - dEQP-VK.sparse_resources.image_sparse_binding.3d.rgba16ui.512_256_6

I don't ever see these errors when running Alchemist/DG2 with xe.ko.

Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30276>
2024-07-24 23:18:36 +00:00
C Stout
8b86653da6 util: fix 32bit compiler error in fossilize_db
error: in call to 'fwrite', size * count is too large for the given buffer

sizeof(uint64_t) is used in the call to fwrite.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30154>
2024-07-24 22:43:17 +00:00
Yiwei Zhang
1af2f5e198 ci: re-enable venus ci
Skip dEQP-VK.binding_model.mutable_descriptor.multiple_arrays_mixed.*
because lavapipe behind venus can end up returning OODM for device
memory allocations.

The instability likely started from lavapipe gaining support of dma-buf
import/export. Then vkr renderer would no longer use the opaque fd
export with lavapipe, and we are hitting certain bottleneck of udmabuf.

Let's get venus ci re-enabled now and we can later flip vkr back to
prefer opaque fd export if seeing lavapipe for comparison.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniel.stone@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30356>
2024-07-24 22:25:23 +00:00
Faith Ekstrand
71639eb837 nak: Use the RED path for atomics with unused destinations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Faith Ekstrand
c347c7cbd8 nak/sm50: Implement OpAtom with Dst::None as RED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Faith Ekstrand
959ae0161b nak/sm70: Implement OpAtom with Dst::None as RED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Martin Krastev
bcff324ef3 svga/ci: disable vmware-qemu-traces jobs
The vmware farm job vmware-qemu-traces is currently not runnable after
network restructuring (new firewall rules). Disable job for now.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
61a647ba4a svga/ci: triage unexpected piglit passes
Triage piglit unexpected passes
	spec@!opengl 1.1@clipflat
	spec@!opengl 1.0@gl-1.0-polygon-line-aa
	spec@arb_buffer_storage@bufferstorage-persistent
	spec@arb_copy_buffer
	spec@arb_sync@clientwaitsync-timeout
	spec@ext_direct_state_access@named-buffers

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
93005d20ee svga/ci: update FORCE_KERNEL_TAG
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
d0df53558e svga/ci: triage unexpected piglit pass
Triage unexpected pass
	shaders@glsl-bug-110796

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
8bcd18c90e svga/ci: change DNS server for vmware jobs
Previous vmware-specific DNS server no longer valid.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
c98f5d5eea svga/ci: enable vmware farm
Enable vmware svga farm after network maintenance

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Matt Turner
aae82061af intel/clc: Free disk_cache
Fixes: c15bf88f01 ("intel: Add a little OpenCL C compiler binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
2024-07-24 20:46:28 +00:00
Matt Turner
1574372de4 intel/clc: Free parsed_spirv_data
This declaration shadowed a variable by the same type and name in an
outer scope. That variable is passed to clc_free_parsed_spirv().

Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
2024-07-24 20:46:28 +00:00
David Rosca
8b1a889e45 radeonsi/vcn: Add support for QVBR rate control mode
This rate control mode needs pre-encode enabled and currently is
supported for VCN3 and VCN4.
AV1 needs quality level scaled down from 255 to 51 range.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4024
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
David Rosca
ae293d176b radeonsi/vcn: Bump enc FW interface version for VCN3 and VCN4
This is needed to enable QVBR support. Also adjust to changes in
spec_misc_av1.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
David Rosca
e539f8ef5f radeonsi/vcn: Only enable filler data for CBR
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
C Stout
b6d8dd6c9f util: fix fossilize_db compile error
Observed in Fuchsia build (with -Wwrite-strings):

error: passing 'const char[10]' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30334>
2024-07-24 19:32:08 +00:00
Eric Engestrom
f1f8c465d5 vc4,v3d,v3dv: avoid compiling in unused sim_file field in the {vc4,v3d}_screen/v3dv_physical_device struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:24 +00:00
Eric Engestrom
eae740f2e4 v3d,v3dv: simplify USE_V3D_SIMULATOR/using_v3d_simulator logic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:24 +00:00
Eric Engestrom
5577078ac1 v3d,v3dv: figure out whether we're using the simulator only once
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:23 +00:00
Eric Engestrom
f90d1182e0 v3d,v3dv: reuse dep_v3d_hw from simulator/meson.build
broadcom/simulator/ gets parsed before broadcom/vulkan/ or
gallium/drivers/v3d/ so this is safe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:23 +00:00
Alessandro Astone
7949471716 egl/gbm: Walk device list to initialize DRM platform
We cannot always use /dev/dri/card0.
As a matter of fact, on systems with SimpleDRM enabled /dev/dri/card0
will be created by it and removed once a GPU driver has loaded.

In any case we shouldn't hard-code the device number and instead walk
the device list to find the first suitable device.

This issue is trivially reproducible with `eglinfo -B -p gbm` on
Ubuntu 24.04 or Fedora 40

Fixes: 32f4cf3808 ("egl/gbm: Fix EGL_DEFAULT_DISPLAY")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30325>
2024-07-24 17:35:40 +00:00
Dylan Baker
4ef0cbaf05 crocus: check for depth+stencil before creating resource
This avoid leaking memory if we return early.

Fixes: 5f7df5df0d ("crocus: disable depth and d+s formats with memory objects")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
2024-07-24 17:21:26 +00:00
Dylan Baker
34145725ce crocus: properly free resources on BO allocation failure
Iris already has the same fix applied.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
2024-07-24 17:21:26 +00:00
Dylan Baker
11bc95934f tgsi_to_nir: free disk cache value if the size is wrong
Fixes: 4db880d805 ("ttn: Implement disk cache")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30308>
2024-07-24 16:50:59 +00:00
José Roberto de Souza
945564e498 anv: Wait for Xe exec queue to be idle before destroying it
Paulo reported that Vulkan is also affected by the drop of permanent
exec queues in Xe KMD, Iris already have this handling.

So here using the special DRM_IOCTL_XE_EXEC with num_batch_buffer == 0
to get a syncobj signaled when the last DRM_IOCTL_XE_EXEC is completed.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30156>
2024-07-24 16:27:30 +00:00
Mike Blumenkrantz
6cd4372460 ci: prune dri from LD_LIBRARY_PATH
partial revert of 50fc7cc290

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30346>
2024-07-24 15:53:12 +00:00
Christian Gmeiner
a885f91617 etnaviv: Rework uniform handling for UBO addresses
We are not using this 'feature'. Doing this in the
compiler would be lot of pain, as there is no backend
IR. The right way to do it would be nir address opt pass,
that does some offset and shift lowering. Lets see this
commit as prep change for a nir pass and/or backend IR.

Use the content to store the index of the UBO.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30331>
2024-07-24 12:52:22 +00:00
Mike Blumenkrantz
9b7bb6cc9f gallium: install gallium-$version.so to libdir
Installing this private library into the default library
search path avoids needing to rely on -Wl,-rpath,
which is inconsistently implemented as either DT_RUNPATH
or DT_RPATH on different distributions; in particular,
on distributions that implement it as DT_RPATH,
it interferes with use of LD_LIBRARY_PATH and has semantics
that are difficult to reason about, and is incompatible with
Steam's container runtime (which has the known limitation that
it only implements DT_RUNPATH and not DT_RPATH).

To avoid third-party developers being tempted to link to the
unstable libgallium, give it a name that varies with each Mesa release,
so that there is no obvious way for third-party software to link to it.
This is similar to the way the proprietary Nvidia driver sets up its similar
implementation-detail libraries such as libnvidia-glcore.so.535.183.01.

Fixes: 50fc7cc2 ("glx: directly link to gallium")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30328>
2024-07-24 12:15:55 +00:00
Karol Herbst
098e660a58 rusticl/memory: add a couple of performance warnings
It's mostly just GPU stalls for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Karol Herbst
ea0676d8ec rusticl/memory: remove stale TODOs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Karol Herbst
aae84eccfa rusticl/platform: add perf debug option
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Mary Guillemard
b3cd3b0ed4 panvk: Implement CmdBindDescriptorSets2KHR, CmdPushConstants2KHR and CmdPushDescriptorSet2KHR
Those are part of maintenance6.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
0329070233 panvk: Emit viewport when state is NULL
When rasterizerDiscardEnable is active, it is allowed to have viewport
and scissor disabled.

In case we don't have any viewport defined we now define an empty one.

This is required for
"dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics"
as it never set any viewports and cause fault on IDVS jobs as a result.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
cec45cac84 panvk: Fix image support in vertex jobs
There were various bugs causing images access to fault.

This fixes
"dEQP-VK.memory.pipeline_barrier.host_write_storage_buffer.*" and
possibly other tests.

Fixes: 7bea6f8612 ("panvk: Overhaul the Bifrost descriptor set implementation")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
3b1b672849 panvk: Implement CmdPushDescriptorSetWithTemplate2KHR
We don't support maintenance6 yet but this is needed for
"dEQP-VK.binding_model.shader_access.secondary_cmd_buf.bind.with_push_template.*".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
6b9db2108d docs: Add panvk in VK_EXT_private_data to features.txt
Was missing from the commit enabling it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
af998eb2bf panvk: Update CI fails
Found with a full run without fraction, seems to have been present for a
while.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Eric Engestrom
e634acaf88 docs: add stub header for u_format_gen.h
Warning, treated as error:
docs/isl/aux-surf-comp.rst:51:docs/../src/util/format/u_formats.h:33: 'util/format/u_format_gen.h' file not found

Fixes: e05415a82e ("format: Generate endian-independent format aliases")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30339>
2024-07-24 11:26:39 +02:00