Commit graph

195561 commits

Author SHA1 Message Date
Georg Lehmann
151cd9c92b ac/lower_ngg: use is_subgroup_invocation_lt_amd offset
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
bcfc5c09fa amd: add offset to is_subgroup_invocation_lt_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:13 +00:00
Dave Airlie
29207d83a7 zink: whitespace fixups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Dave Airlie
fd2a816010 zink: handle mutable check without crashing if format list not found
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
1511e6e24c zink: move some image ici init up
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
3f65a3928f zink: stop creating useless sampler conversions
this needs to be context-based and hashed/shared

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Dave Airlie
890e7555d4 zink: free modifiers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
f332128ccf zink: swap sampler conversion conditional with yuv check
this is more useful

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
ad7eee23e9 zink: slightly refactor image tiling inference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
db420b2406 zink: correctly handle disjoint image creation
this is set/bound based on format flags

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
e820e002ce zink: fix planar image creation with mutable
spec currently broken, but this is correct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
54d16dbe29 zink: only clamp samplerview aspect for zs formats
this otherwise breaks planar images

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Kai Wasserbäch
4d88d8ba4c fix(FTBFS): clover: use .getDataLayout() with LLVM >= 20
Upstream LLVM commit 75c7bca740935a0cca462e28475dd6b046a6872c removed
the option to pass a Module pointer to DataLayout's constructor.

This commit does the same, that upstream did for their code in clover.

Reference: 75c7bca740
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11863
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31350>
2024-09-26 12:03:37 +00:00
Samuel Pitoiset
777f9900b3 vulkan: Update XML and headers to 1.3.296
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31381>
2024-09-26 11:12:03 +00:00
Mary Guillemard
d4cb32f42f panfrost: Implement context priority on v10
This implement PIPE_CAP_CONTEXT_PRIORITY_MASK and handle priority flags
for v10.

This effectively expose EGL_IMG_context_priority and
EGL_NV_context_priority_realtime.

Expose of what is currently supported from the panthor uAPI.

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/30991>
2024-09-26 10:21:19 +00:00
Mary Guillemard
83bc9bb1af pan/kmod: Add priority query uapi support
This adds support for the new DEV_QUERY_GROUP_PRIORITIES_INFO query from
panthor to report and will be used to report appropriate priority mask
in the Gallium driver.

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/30991>
2024-09-26 10:21:19 +00:00
Mary Guillemard
c0b55da825 panfrost: Update panthor_drm.h with latest
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/30991>
2024-09-26 10:21:19 +00:00
Lucas Stach
c49a71c03c gbm: mark surface buffers as explicit flushed
Some drivers are able to optimize buffer usage when it is known that
external visibility of buffer changes only needs to be guaranteed
after well defined transition points, like eglSwapBuffers.

Add a BO flag to specify this behavior and set it with GBM surfaces.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30077>
2024-09-26 09:36:46 +00:00
Thomas Wagner
3786f5c27a llvmpipe: Remove unused struct member
This was removed by an earlier commit but snuck back in.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:33 +00:00
Thomas Wagner
3e01c15fa7 llvmpipe: properly save llvmpipe_memory_allocation in memory_object
Importing an opaque fd no longer returns the mapped pointer but
a pointer to llvmpipe_memory_allocation to support both memfds and
dma bufs. This saves the pointer with the correct type and we can
unwrap the mapped data in a correct way.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Thomas Wagner
39156b6cd4 llvmpipe: Unmap DMA buffer to release all resources
If the buffer is not unmapped then a reference to the DMA buffer
is still kept. The DRM device is then not properly cleaned up.
This can cause the application to keep a DRM device open which is
still DRM master without any visible open file descriptors.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Thomas Wagner
af16ec6e0c llvmpipe: Fix external memory object reference
Make the external memory object a reference counted object. Without
that deleting the memory object in OpenGL would also delete and unmap
the memfd, which causes any operation on a texture or buffer that is
bound to that memory object to access invalid memory.

Fixes: 1608a815e3 ("llvmpipe: add support for EXT_memory_object(_fd)")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Sagar Ghuge
f39cd30f4f anv: Track all the descriptor sets
During compute state save/restore, let's track all the descriptor sets.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30798>
2024-09-26 06:56:21 +00:00
Juan A. Suarez Romero
786caf580b broadcom: do not include simulator if not available
Instead of including always the simulator file and have the code under
`#ifdefs` depending if the simulator is available or not, let's not
include the simulator directory entirely if the simulator is not
available.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31356>
2024-09-26 06:12:23 +00:00
Dave Airlie
a59efe40b2 radv/video: handle missing h265 feedback struct.
I'm not sure this should be missing, but handle if if it is.

Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 7c6e3c70b6 ("radv/video/enc: report pps overrides in feedback for h265")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
db5312f842 radv/video: add encode field for vcn4
Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
c78e32da3b radv/video/enc: report pictureAccessGranularity of CTB size.
Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
9fab2072a3 radv/video: use the h264 defines for macroblock w/h
Just a cleanup, add some comments as well.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Colin Marc
88dacc3d80 radv/video: set TemporalId correctly
This is only relevant for hierarchical coding using sub-layers.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Colin Marc <hi@colinmarc.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31303>
2024-09-26 04:18:11 +00:00
Colin Marc
2cf5ef37ba vulkan/video: set HEVC nuh_temporal_id_plus1 and nal_unit_type correctly
This is only relevant for hierarchical coding using sub-layers.

Fixes: 72f52329cd ("vulkan/video: add a nal_unit lookup for hevc")

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Colin Marc <hi@colinmarc.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31303>
2024-09-26 04:18:11 +00:00
Iván Briano
101a803858 vulkan: use standard sample locations if there's no VkPipelineSampleLocationsStateCreateInfoEXT
If the pipeline is created with no
VkPipelineSampleLocationsStateCreateInfoEXT, but
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is set, we end up
dereferencing a NULL pointer.

Fixes future dEQP-VK.pipeline.*.extended_dynamic_state.*.sample_locations_enable_no_create_info

Fixes: 1deb83fb86 ("vulkan: Add more dynamic multisample states")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31377>
2024-09-26 03:43:57 +00:00
Marek Olšák
09e64e3682 nir/opt_shrink_vectors: shrink memory loads, not just IO
The problem with radeonsi+ACO is that UBO loads from vec4 uniforms using
only 1 component always load all 4 components. This fixes that.

We are only interested in shrinking UBO and SSBO loads, but I added more
intrinsics because why not.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29384>
2024-09-26 03:01:38 +00:00
Eric R. Smith
ef2bb4728f panvk: Support blend shaders for alpha_to_one_enable
As in OpenGL, if alpha-to-one is required for Vulkan generate a
blend shader for it (since the hardware does not support alpha_to_one
natively).

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31194>
2024-09-26 02:25:28 +00:00
Eric R. Smith
008a17da60 panfrost: fix SAMPLE_ALPHA_TO_ONE
When SAMPLE_ALPHA_TO_ONE is enabled we need to use a blend shader, as
the BlendDescriptor.alpha_to_one bit is deprecated (does not work)
on bifrost and valhall.

In order to generate the appopriate blend shader code, we must put the
alpha_to_one status into pan_blend_state.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31194>
2024-09-26 02:25:28 +00:00
Rob Clark
9ee75f9141 freedreno/register: A couple pm4 updates
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31349>
2024-09-26 01:06:24 +00:00
Rob Clark
0ae340bb0d freedreno/crashdec: Fix fault address handling
The "  - far:" pattern never landed upstream (yet) but was part of some
enhanced fault debugging we have in the CrOS kernel.  Update crashdec to
handle both cases.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31349>
2024-09-26 01:06:23 +00:00
Pohsiang (John) Hsu
e0d77f925e d3d12: fix incorrect memset in d3d12_video_encoder_references_manager_hevc
Fixes: 92d6989fdc ("d3d12: Add support for HEVC 4:4:4 video encode using AYUV format")

Signed-Off-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31371>
2024-09-26 00:29:53 +00:00
Nikita Popov
a8eed9cca2 gallium: Don't pass avx512er and avx512pf features on LLVM 19
These target features have been remove in LLVM 19, and cause
warnings like the following to be printed:

    '-avx512er' is not a recognized feature for this target (ignoring feature)
    '-avx512pf' is not a recognized feature for this target (ignoring feature)

Do not pass these target features on LLVM 19 and newer.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11870
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31321>
2024-09-25 22:40:35 +00:00
Dylan Baker
f8273555d3 anv: enable VK_EXT_ycbcr_2plane_444_formats
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31352>
2024-09-25 22:10:14 +00:00
Sil Vilerino
6aca12c51d d3d12: Fix HEVC chroma_format_idc, separate_colour_plane_flag and conf_win_*_offset for HEVC 444
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31361>
2024-09-25 21:18:18 +00:00
Mary Guillemard
43db7e5323 egl: Support NV_context_priority_realtime
This extension extends EGL_IMG_context_priority with a new
EGL_CONTEXT_PRIORITY_REALTIME_NV attribute.

Effectively, Gallium drivers would need to implement
PIPE_CONTEXT_REALTIME_PRIORITY flag in context_create and expose
PIPE_CONTEXT_PRIORITY_REALTIME on PIPE_CAP_CONTEXT_PRIORITY_MASK to
enable this extension.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30989>
2024-09-25 20:17:27 +00:00
Caio Oliveira
d12950539c intel/brw: Consider pipe when comparing SWSB in tests
When tests were added, there was a single pipe (float), so there wasn't
a pipe to compare in `operator==`.  Add it there now and adjust
expectations accordingly.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31335>
2024-09-25 19:32:31 +00:00
Konstantin Seurer
b33a29f61e lavapipe: Implement VK_KHR_shader_subgroup_rotate
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31250>
2024-09-25 18:47:56 +00:00
Konstantin Seurer
dfa314e805 lavapipe: Implement clustered reductions
Replaces the runtime loop with a compile time loop and restarts the scan
on multiples of cluster_size.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31250>
2024-09-25 18:47:56 +00:00
Lars-Ivar Hesselberg Simonsen
1f3b8bb918 panvk: Add support for Draw[Indexed]Indirect
Adds support for limited Draw[Indexed]Indirect. MultiDrawIndirect and
DrawIndirect + layers are still not supported and will just hit an
assert for now.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11887
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:31 +00:00
Lars-Ivar Hesselberg Simonsen
ec2222f7a6 panvk: Split panvk_cmd_draw into prepare_draw
To prepare for adding draw_indirect, move shared parts into a separate
function called prepare_draw.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:31 +00:00
Lars-Ivar Hesselberg Simonsen
1fa364bfe3 panvk: Add get_tiler_idvs_flags
To prepare for factoring out a larger part of panvk_cmd_draw to a
separate prepare function, move tiler idvs flag calculation to a
separate function.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
fb67fc6d08 panvk: Only set index buffer size for DrawIndexed
There is no need to update the index_array_size register unless the draw
is indexed and the index buffer has changed. For non-indexed draws, this
field is not read.

To achieve this, add a new function prepare_index_buffer that updates
both the size and the pointer registers in case the state is dirty.

As this decouples the index buffer size register from the drawcall, set
the full index buffer size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
9da908838a panvk: Use the passed Vertex Attribute divisor
MALI_ATTRIBUTE_FREQUENCY_INSTANCE allows us to use the passed vertex
attribute divisor directly without having to multiply it by vertex
count.

This decouples the vertex attribute building from drawcalls.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
0b11d1a96f panvk: Map device memory for PANVK_DEBUG=trace
This allows us to trace applications that use device memory for
LOAD_MULTIPLE operations.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00