Commit graph

2385 commits

Author SHA1 Message Date
David Rosca
4b54277d2e Remove VDPAU
VDPAU only supports X11 and GL interop. There is no Wayland or Vulkan
interop support. The API has limitations that makes it impossible to
correctly decode certain streams.
Application support is also very limited, and VAAPI is always a better
choice over VDPAU.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
Mike Blumenkrantz
b3133e250e gallium: add pipe_context::resource_release to eliminate buffer refcounting
refcounting uses atomics, which are a significant source of CPU overhead
in many applications. by adding a method to inform the driver that
the frontend has released ownership of a buffer, all other refcounting
for the buffer can be eliminated

see MR for more details

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36296>
2025-09-09 20:47:38 +00:00
GKraats
3b5b68dbfb crocus: fix SIGSEGV crash at pbo compressed teximage
This affects piglit/bin/ext_texture_array-compressed teximage pbo -auto -fbo

Routine create_surface() at src/gallium/drivers/crocus/crocus_state.c
does not suppport compressed format and returns NULL in that case.

Since MR https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054
routine st_try_pbo_compressed_texsubimage() at src/mesa/state_tracker/st_cb_texture.c is missing a test via pipe->create_surface() and does
not fallback to _mesa_store_compressed_texsubimage() which causes a SIGSEGV abort.

Regression is solved by introducing the variable surface_no_compress at struct pipe_caps, causing the fallback.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13426

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37150>
2025-09-04 21:12:15 +00:00
Karol Herbst
389577c8bb radeonsi: implement pipe_screen::semaphore_create
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
cc32c5c2eb gallium: add pipe_screen::semaphore_create
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Qiang Yu
a4b6e8b1aa mesa: implement mesh shader queries
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36751>
2025-08-22 10:01:57 +00:00
David Rosca
325de7fe7e pipe: Remove now unused is_video_target_buffer_supported
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36755>
2025-08-20 14:25:45 +00:00
David Rosca
efc6d27fd4 frontends/va: Add support for decode/encode processing
This implements support for Decode processing allowing to perform
processing operation on the decoded picture in one single call without
having to use separate processing context.

This also implements the same functionality for encoding, which is
useful to perform conversion from RGB to YUV in a single call, and it
allows us to properly support the conversion inside encoder (eg. EFC on
AMD).
For Encode processing the additional output buffer is required same as
with Decode processing, but driver may not use it to perform the
conversion (in case where the conversion can be done by the encoder hw).
This means the contents of the additional buffer is undefined, and
application should not rely on the buffer actually containing output
picture of the conversion.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36755>
2025-08-20 14:25:45 +00:00
David Rosca
b0a5d78247 frontends/va: Remove EFC support
It will be moved to encode processing in next commits.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36755>
2025-08-20 14:25:45 +00:00
Corentin Noël
6da8752758 tgsi: Remove return type from tgsi_instruction_texture
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This return type is never used.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36765>
2025-08-15 08:03:04 +00:00
Corentin Noël
f78a52fd0a tgsi: Drop TGSI_SEMANTIC_TESS_DEFAULT_OUTER/INNER_LEVEL
Nothing is emitting this anymore and it is not used by virglrenderer too.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36758>
2025-08-13 13:55:01 +00:00
Qiang Yu
aebf0abbf1 gallium: add mesh shader caps
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:41 +00:00
Qiang Yu
f972e76148 all: rename pipe_shader_type to mesa_shader_stage
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\benum pipe_shader_type\b/mesa_shader_stage/g' {} +
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bpipe_shader_type\b/mesa_shader_stage/g' {} +

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569>
2025-08-06 10:28:40 +08:00
Qiang Yu
799806d85e all: rename PIPE_SHADER_MESH_TYPES to MESA_SHADER_MESH_STAGES
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bPIPE_SHADER_MESH_TYPES\b/MESA_SHADER_MESH_STAGES/g' {} +

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569>
2025-08-06 10:28:40 +08:00
Qiang Yu
07a3a54d37 all: rename PIPE_SHADER_TYPES to MESA_SHADER_STAGES
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bPIPE_SHADER_TYPES\b/MESA_SHADER_STAGES/g' {} +

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569>
2025-08-06 10:28:39 +08:00
Qiang Yu
11027dd3f8 all: rename PIPE_SHADER_FRAGMENT to MESA_SHADER_FRAGMENT
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_FRAGMENT/MESA_SHADER_FRAGMENT/g' {} +

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569>
2025-08-06 10:28:39 +08:00
David Rosca
6247c7fdc1 frontends/va: Add H264 encode more_rbsp_data PPS flag
Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
2025-07-29 11:30:24 +00:00
Tomeu Vizoso
0845acf578 teflon: Add support for Transpose
Channel-first to channel-last, and the opposite.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:33 +00:00
Tomeu Vizoso
005ab1f0fe teflon: Add support for Subtract
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:33 +00:00
Tomeu Vizoso
9c6cab0458 teflon: Add support for Logistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:31 +00:00
Tomeu Vizoso
519a8b0f4a teflon: Add support for Absolute
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:31 +00:00
Tomeu Vizoso
1a102e05b5 teflon: Add support for non-fused Relu operations
Typically ReLU will be fused to a convolution, but that is not always
the case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:30 +00:00
Tomeu Vizoso
dae0af20ab teflon: Add support for Reshape operations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
2025-07-28 14:14:29 +00:00
Tomeu Vizoso
49bffdd797 teflon: Query drivers on what operations they support
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698>
2025-07-28 08:06:38 +02:00
Marek Olšák
c1a939ca11 gallium: replace get_compiler_options with pipe_screen::nir_options
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36094>
2025-07-21 00:18:20 +00:00
Marek Olšák
a30f1fa7f0 gallium: make pipe_screen::finalize_nir return void
The returned message was replaced by create_xx_state returning the message.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36094>
2025-07-21 00:18:20 +00:00
Boyuan Zhang
587102196c pipe: add gaps_in_frame for h264
Add gaps_in_frame_num_value_allowed_flag to h264 sps struct.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36056>
2025-07-17 12:44:51 +00:00
Faith Ekstrand
56ed5cf1bb dri: Get rid of __DRIbackgroundCallableExtension
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was originally needed to bind the context to the background thread
for DRI2 because it needs to be able to get buffers from the X server.
With DRI3 and Wayland, however, it's not needed.  All the DRI3 code gets
everything it needs from the drawable and only uses the context for
flushes and blits, which always come from GLX itself, not the render
thread.  Now that we've deleted all the DRI2 code, let's delete this,
too.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36123>
2025-07-16 01:32:56 +00:00
Yogesh Mohan Marimuthu
9fa192ea22 radeonsi: submit cs_preamble_state to as first job in userqueue
Also any other new context's cs_preamble_state will not be submitted.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35106>
2025-07-13 20:05:27 +00:00
Qiang Yu
2f5ff9788a Revert "gallium: add drawid_offset to draw_mesh_tasks interface"
This reverts commit 27cd4b061c.

It's always 0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35931>
2025-07-11 02:25:50 +00:00
Qiang Yu
0a4569fc92 gallium: remove ir arg from pipe_screen.get_compiler_options
It's always PIPE_SHADER_IR_NIR.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35931>
2025-07-11 02:25:50 +00:00
Daniel Stone
e59305c29f dri: Remove remnants of TexBuffer extension
This is no longer needed as a DRI extension.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:59 +00:00
Daniel Stone
a9298ca55c dri: Remove DRI2 loader extension
Now that all our backends are either swrast or using client image-based
allocation, we don't need the DRI2 loader interface anymore. Remove it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:59 +00:00
Rob Clark
ba7454a155 dri2+gallium: Support to import suboptimal formats
In some cases a format may be supported in a more limited way by the
hardware.  For example, formats with NPoT pixel sizes.  A driver might
normally prefer that mesa/st use R8G8B8X8 rather than R8G8B8.  But if
the user wants to (dma-buf/etc) import R8G8B8, it is still possible,
and in this case zero copy is more important.

So add a PIPE_BIND_x flag as a hint to the driver when checking if
a format is supported.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:43 +00:00
Konstantin Seurer
803521f416 gallium: Add back pipe_rasterizer_state::offset_units_unscaled
The field was removed with the nine removal but it is needed for depth
bias control on Vulkan.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Mike Blumenkrantz
035d837a92 gallium: fix timeline semaphore value passing
using a screen method for this is broken since the value can change
before it is flushed. it must be passed along with the methods that use it

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
6e8b9e143d mesa: support NV_timeline_semaphore
this is for use with vulkan interop and carries the same mechanics

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
d65c37f72e mesa: PIPE_FD_TYPE_TIMELINE_SEMAPHORE -> PIPE_FD_TYPE_TIMELINE_SEMAPHORE_D3D12
functionally this is the same as other types of timeline semaphores, but
it is not actually the same as other types of timeline semaphores, e.g.,
in vulkan it would be VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT
whereas other types of timeline semaphores would have different handle types

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:28 +00:00
Jesse Natalie
5f3a7cee83 gallium/video: Frontends separate in_fence and out_fence
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35900>
2025-07-07 15:41:28 +00:00
Mike Blumenkrantz
8b8a06f6c3 gallium: add pipe_context::image_copy_buffer
this is a more explicit version of the copying used in resource_copy_region
which also provides stride info

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:03 +00:00
Daniel Stone
4aaf431a11 dri: Garbage-collect old DRI interfaces
We don't use these in the tree, so declaring them only adds to
misdirection and annoyance.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:26 +00:00
Daniel Stone
4d61e281ea dri2: Remove format components mapping
This was only used to answer the DRI components attrib request, which
was made unused as of the previous commit to move knowledge of the enum
to wayland-drm server-side code.

In theory, this makes the format mapping a little less flexible, however
in practice wayland-drm was neither extensible nor extended, and has
been deprecated in favour of explicit user awareness of format
properties.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:25 +00:00
Adrián Larumbe
a4ffd2395f mesa: Implement label sharing from GL objects with UM drivers
At the moment, the string passed to glObjectLabel() stays only within the
confines of GL objects. It would be nice if that textual description could
be made known to the underlying drivers somehow.

Expand the pipe screen function interface to allow passing GL object labels
down to the UM driver that handles a particular pipe screen.

Not all GL objects have an associated GL resources, so this behaviour has
been implemented for those which are associated with at least one.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:08 +00:00
Karol Herbst
ee7536a1e3 radeonsi: implement SVM interfaces
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175>
2025-06-20 15:10:42 +00:00
Mike Blumenkrantz
d2d98abf1d gallium: add compressed_surface_reinterpret_blocks_layered
this affects piglit/bin/ext_texture_array-compressed teximage pbo -auto -fbo

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6891

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35612>
2025-06-20 14:47:25 +00:00
Emma Anholt
211e03d026 gallium: Remove the need for set_clip_state() on !PIPE_CAP_CLIP_PLANES.
More driver boilerplate we don't need.  We do still have to go through the
transformation in st_atom_clip.c because the clip state can get used in
draw fallbacks.  This revealed that lima had a dirty bit being set that
nobody was reading.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8953>
2025-06-19 21:44:55 +00:00
Pierre-Eric Pelloux-Prayer
ee6d3a593e winsys/radeon: add surface_offset_from_coord
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:27 +00:00
Sil Vilerino
1b801a95ae pipe: Add video encode PSNR output stats
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
daa16cf0d4 pipe: Two pass video encode definitions
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Ashley Smith
c5500cd12f mesa: Add support for GL_EXT_shader_realtime_clock
This is similar to ARB_shader_clock

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34345>
2025-06-04 14:49:00 +00:00