Commit graph

179494 commits

Author SHA1 Message Date
Martin Roukala (né Peres)
2a65bb292d zink/ci: drop the concurrency of the zink-radv-vangogh-valve job
We seem to be hitting the BAR0 size limit which triggers an amdgpu bug.
Let's drop the concurrency from 8 to 6 to alleviate pressure on BAR0,
and hopefully work around this kernel bug.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25883>
2023-10-25 21:46:45 +00:00
Lionel Landwerlin
439b0e8688 intel/fs: fix dynamic interpolation mode selection
We can end up in situation where we are dispatched with a multisample
framebuffer but not at per-sample. In this case we would request the
at_sample value with the wrong message configuration.

Relying on the BRW_WM_MSAA_FLAG_MULTISAMPLE_FBO flag superseeds
BRW_WM_MSAA_FLAG_PERSAMPLE_DISPATCH.

Fixes piglit tests :

spec@arb_gpu_shader5@arb_gpu_shader5-interpolateatsample*

With Zink on Anv

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 68027bd38e ("intel/fs: implement dynamic interpolation mode for dynamic persample shaders")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25854>
2023-10-25 21:15:48 +00:00
Eric Engestrom
0757ac6527 docs: reset new_features.txt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25892>
2023-10-25 19:56:42 +00:00
Eric Engestrom
ed8abf1e2d VERSION: bump to 24.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25892>
2023-10-25 19:56:42 +00:00
Lionel Landwerlin
a97065adab anv: fix uninitialized use of compute initialization batch
We sometimes fail initialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 09d12e6727 ("anv: Add support for I915_ENGINE_CLASS_COMPUTE in init_device_state()")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25891>
2023-10-25 19:27:23 +00:00
Iago Toral Quiroga
84001ea425 v3dv: fix confusing nomenclature about DRM nodes
We have been using drm_render_device to refer to the render device and
drm_primary_device to refer to the display device, but that is confusing
because the render device also has a primary node (for legacy reasons),
so don't use primary to refer to the display device.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25748>
2023-10-25 19:11:37 +00:00
Mike Blumenkrantz
d0f775e54d ci: skip implicit modifier piglits for zink
these may work coincidentally but not uniformly

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25299>
2023-10-25 18:23:17 +00:00
Mike Blumenkrantz
99ff88cb5e zink: delete some dead modifier handling
this is no longer hit

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25299>
2023-10-25 18:23:16 +00:00
Mike Blumenkrantz
1c3db3e39a zink: blow up broken xservers more reliably
only certain drivers can successfully run an xserver with implicit modifier
handling, and the rest will have broken rendering

until such time that a vk extension emerges to handle this more widely,
break this interop for drivers where it's already broken

fixes #9819

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25299>
2023-10-25 18:23:16 +00:00
Mike Blumenkrantz
ff093f522a zink: use weston for anv ci
gotta get those juicy modifiers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25299>
2023-10-25 18:23:16 +00:00
Rhys Perry
477b310dfd util: skip zero-sized SHA1Update
Fixes UBSan error:
src/util/sha1/sha1.c:140:8: runtime error: null pointer passed as argument 2, which is declared to never be null

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25853>
2023-10-25 17:27:47 +00:00
Rhys Perry
1afd0878e9 nir/lower_shader_calls: skip zero-sized qsort
Fixes UBSan:
src/compiler/nir/nir_lower_shader_calls.c:1681:7: runtime error: null pointer passed as argument 1, which is declared to never be null

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25853>
2023-10-25 17:27:47 +00:00
Rhys Perry
f9289dfd02 nir/serialize: fix signed integer overflow
Fixes UBSan error:
src/compiler/nir/nir_serialize.c:1277:70: runtime error: left shift of 524287 by 13 places cannot be represented in type 'int'

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25853>
2023-10-25 17:27:47 +00:00
Alyssa Rosenzweig
9a6c20e64f nir/trivialize_registers: Handle obscure load hazard
Somebody less tired than me would add a unit test for this. Offending snippet:

        32    %58 = @load_reg (%55) (base=0, legacy_fabs=0, legacy_fneg=0)
        32    %57 = @load_reg (%55) (base=0, legacy_fabs=0, legacy_fneg=0)
        32    %21 = iadd %57, %15 (0x1)
                    @store_reg (%21, %55) (base=0, wrmask=x, legacy_fsat=0)
        32    %56 = @load_reg (%55) (base=0, legacy_fabs=0, legacy_fneg=0)
        32    %22 = i2f32 %56
        32    %23 = load_const (0x41000000 = 8.000000)
        32    %24 = fdiv %22, %23 (8.000000)
        32    %90 = mov %24
                    @store_reg_indirect (%90, %78, %58) (base=0, wrmask=x, legacy_fsat=0)

Closes: #10031
Fixes: d313eba94e ("nir: Add pass for trivializing register access")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reported-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25865>
2023-10-25 16:34:47 +00:00
Karol Herbst
6aef22af77 docs/features: remove empty lines confusing mesamatrix
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25886>
2023-10-25 16:23:55 +00:00
Samuel Pitoiset
1febb6f762 radv: report the last GPUVM fault when a device lost is detected
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:23 +00:00
Samuel Pitoiset
5a6208ad72 radv: query and report the last GPUVM fault with RADV_DEBUG=hang
Tested with a small use-after-free Vulkan test. It's pretty basic
for now but I think I will add status decoding support to report
more useful information.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
5eb8b3e9b1 radv/amdgpu: add support quering the last GPUVM fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
bdc62108be amd: add has_gpuvm_fault_query
Whether the kernel allows to query the last GPUVM fault.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
37462ce72d amd: update amdgpu_drm.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
1b0fbcbe1c radv: remove outdated RADV_DEBUG=vmfaults support
It's been a very long time since this was useless because dmesg
required sudo access for a while.

This will be replaced by the new GPUVM fault interface which allows
to query from the kernel directly instead of trying to parse dmesg.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238>
2023-10-25 15:29:22 +00:00
Seppo Yli-Olli
6bbbdd5ceb zink: Fix SyntaxWarning in zink_extensions script
Fix regex pattern in zink_extensions to use proper escaping. While the original
code works, it relies on Python ignoring incorrect syntax and fallbacking to
passing through the escape. Current behaviour results in SyntaxWarning
whenever the code is used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25881>
2023-10-25 15:03:43 +00:00
Louis-Francis Ratté-Boulianne
5a928f7563 panfrost: Add env variable for max AFBC packing ratio
Add `PAN_MAX_AFBC_PACKING_RATIO` variable. If the ratio (size of the
packed resource) / (size of the sparse resource) * 100 is above that
value, we don't care about packing it.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
888d7c8ee6 panfrost: Add some debug utility methods for resources
Add a method to dump a specific superblock given its index (header
and few first bytes from the body) and a method to dump a resource
to a ppm file.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
33b48a5585 panfrost: Add debug flag to force packing of AFBC textures on upload
Add `forcepack` flag that will force conversion to AFBC-packed right
after a texture is uploaded when possible. We only pack 2D resources
larger than 32x32 as of now.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
bc91af8021 panfrost: Don't force constant modifier after converting
After converting a texture from one modifier to another, there is
no reason to force the modifier to stay constant afterwards. Set
back `modifier_constant` to false because it is changed by
`resource_setup` as it is causing issues when implementing AFBC
packing.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
e9d523bb92 panfrost: Legalize resource when attaching to a batch
Make sure we don't convert the texture for nothing by only
legalizing when creating a batch instead of on surface creation.
Also, to avoid recursive blit, we need to legalize the destination
resource before blitting.

Finally, make sure the resource has a sparse memory layout if
AFBC compressed. The GPU doesn't support rendering to a AFBC-packed
texture.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
bc55d150a9 panfrost: Add support for AFBC packing
When the GPU is converting a texture from linear/tiled to compressed
AFBC, it uses a sparse memory layout. That means that the
superblocks are stored starting at intervals equal to the size of an
uncompressed superblock. When memory usage needs to be optimized, it
is possible to pack the resource by trimming each superblock as much
as possible. The GPU will still be able to read from these packed
textures, but won't be able to write directly to them. If the
layout is AFBC-tiled, the packing process will also de-tile as
tiled+packed is not supported by Mali GPUs.

No new modifier flag has been added as the absence of the
`AFBC_FORMAT_MOD_SPARSE` flag means the resource will be packed.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
32fbd38889 panfrost: Add method to get size of AFBC superblocks valid data
The compute shader is going through all the AFBC header blocks and
calculating the size of valid data by summing up the subblock
sizes (and taking into account solid color, uncompressed mode and
copy blocks). The result is written into the given buffer (array
of `pan_afbc_block_info`).

The size is rounded up to the alignment parameter directly in the
shader.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
ae3fb3089f panfrost: Add infrastructure for internal AFBC compute shaders
A few compute shaders are needed to support AFBC-packing. Here is
just the boilerplate to create, compile and retrieve the shaders.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
c1429a3120 panfrost: Split out internal of panfrost_launch_grid
For an upcoming feature (AFBC packing), we're gonna run internal
compute shaders on resources. This commit just split the internal
of `panfrost_launch_grid` so we can run the shader on a given
batch.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
91514e7091 panfrost: Make panfrost_resource_create_with_modifier public
It allows creating a resource when we already know which modifier
we're gonna use.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
542c44ffde panfrost: Add panfrost_batch_write_bo
Needed when writing to a BO from a compute shader when the BO isn't
assigned to a resource yet.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
113d88f94d panfrost: Precalculate stride and nr of blocks for AFBC layouts
For AFBC packing, we will need to have the stride of the resource
in terms of superblocks and the total number of blocks. It is
easier to pre-calculate once when initializing the resource layout.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
9f3a79a6a3 panfrost: Add method to get size of AFBC subblocks
Each AFBC superblock is subdivised into subblocks that are
compressed individually. For all formats that we currently support,
the subblocks are 4x4 pixels.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:30 +00:00
Louis-Francis Ratté-Boulianne
39efd7c245 panfrost: Add methods to determine slice and body alignment
Those methods are needed to have the same alignment everywhere
without hard-coding the values

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:30 +00:00
Louis-Francis Ratté-Boulianne
6012bde0fc panfrost: Fix error in comment
"linear" -> "tiled"

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
2023-10-25 14:25:30 +00:00
Tapani Pälli
c7e522a9f3 egl: fix leaking drmDevicePtr in _eglFindDevice
Fixes: 3a9e1014e1 ("egl: Rename _eglAddDevice() to _eglFindDevice()")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25524>
2023-10-25 12:37:30 +00:00
Lionel Landwerlin
3de5da7a5d anv: fixup 32bit build of internal shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 11b4c23d19 ("anv: add ring buffer mode to generated draw optimization")
Fixes: db335d9b73 ("anv: factor out host/gpu internal shaders interfaces")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10037
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25870>
2023-10-25 11:47:40 +00:00
Christian Gmeiner
471942e06b etnaviv: Don't leak disk_cache
Fixes: 77af1ca690 ("etnaviv: add disk cache")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25877>
2023-10-25 09:46:37 +00:00
Christian Gmeiner
a53a394d30 ci: Bump PyYAML to 6.0.1
Fixes an issue I am seeing on Fedora 39. For more details
about the upstream fix see https://github.com/yaml/pyyaml/pull/702

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25878>
2023-10-25 10:35:47 +02:00
Tapani Pälli
d52c39a6cd intel/dev: expand existing fix for all gfx12 with small EU count
Commit 7db1b94e07 added a fix for ADL-N but this issue has been
reproduced also on RPL-S and is likely common with all gfx12 variants
with a small EU count.

cc: mesa-stable

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25861>
2023-10-25 05:15:47 +00:00
Caio Oliveira
67450674c0 compiler/types: Move comments and reorganize declarations
Move comments from C++ member functions to the C functions.  In
some cases just delete comments or consolidate them together.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
dfcca13800 compiler/types: Remove warnings about potential fallthrough
None of those cases are expected to fallthrough, but should be unreachable.
Just break them so they get to the unreachable entry at the end.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
9e32cc3d0b compiler/types: Rename glsl_types.cpp to glsl_types.c
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
c45276c665 compiler/types: Annotate extern "C" only once in glsl_types.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
cecdc686e4 compiler/types: Remove usages of C++ members in glsl_types.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
94bdf351dc compiler/types: Use C instead of C++ constants for builtin types
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
07ee4bd69f compiler/types: Add remaining type extraction functions and use them in C++
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00
Caio Oliveira
ada6183d60 compiler/types: Add glsl_simple_explicit_type() and simplify glsl_simple_type()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129>
2023-10-25 01:51:12 +00:00