David Rosca
ab1479ae6a
pipe: Remove PIPE_VIDEO_CAP_ENC_SUPPORTS_ASYNC_OPERATION
...
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31933 >
2024-11-02 07:02:55 +00:00
David Rosca
fae8c09932
frontends/va: Add support for AV1 still picture encode
...
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31784 >
2024-10-29 08:06:44 +00:00
David Rosca
35eb12e2fd
frontends/va: Evict unused surfaces from encode DPB
...
Application should send the full DPB state in each pic to keep
the references alive. Ideally the surfaces would be evicted immediately,
but unfortunately this breaks some applications. Add evict flag and
only evict surfaces if not present in reference frames array for two
consecutive frames.
DPB buffers are not destroyed upon eviction, but instead they are kept
around and reused next time a new surface is added to DPB.
Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741 >
2024-10-24 12:36:37 +00:00
David Rosca
33c6491244
pipe: Fix video enc max DPB size for H264
...
H264 have 16 as maximum DPB size by spec (A.3.1. f) MaxDpbFrames).
For encode we need one more slot for current recon, so use max size + 1.
Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741 >
2024-10-24 12:36:37 +00:00
Marek Olšák
0bffe8ec05
mesa_interface: rename __DRIimage to struct dri_image
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
ee54fe9f69
mesa_interface: rename __DRIconfig to struct dri_config
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
872b5c70d1
mesa_interface: remove redundant __DRI*Rec types
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
186a3b6dad
mesa_interface: replace opaque __DRIdrawable with struct dri_drawable everywhere
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
329e03535b
mesa_interface: replace opaque __DRIcontext with struct dri_context everywhere
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
1ce9aa3d65
mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere
...
it's always struct dri_screen
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:02 +00:00
Marek Olšák
3b603d1646
mesa_interface: remove unused stuff
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752 >
2024-10-22 06:48:01 +00:00
Pierre-Eric Pelloux-Prayer
19fa5561be
radeonsi: fix radeon_canonicalize_bo_flags domain handling
...
ffs(VRAM, GTT) returns the GTT bit as it's the smaller.
Simplify the code by explicitely selecting VRAM when both
domains are active, otherwise assert that only 1 bit is set.
Fixes: 593f72aa21 ("winsys/amdgpu-radeon: rework how we describe heaps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683 >
2024-10-18 14:04:02 +02:00
Mike Blumenkrantz
f5bd39e0e3
gallium: delete duplicated viewmask member in draw info
...
this was added for lavapipe, but it should have been in the
framebuffer state since it is a framebuffer state
now the GL multiview extensions are supported with viewmask
in the framebuffer struct, which means this is all redundant
and should be corrected/deleted
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31590 >
2024-10-15 14:01:42 +00:00
David Rosca
c56fc312a8
frontends/va: Parse H264 prefix for temporal_id
...
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148 >
2024-10-11 13:55:54 +00:00
David Rosca
ce2eedd13e
frontends/va: Fix parsing HEVC st_ref_pic_set
...
According to spec, the slice ref pic set is the last entry
in st_ref_pic_set[] array.
As such, the maximum number of st ref pic sets is 65.
Fixes: ef8ba75718 ("frontends/va: Parse HEVC slice packed header")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31308 >
2024-10-11 10:46:49 +00:00
David Rosca
46d8e57f16
frontends/va: Remove now unused ref fields for AV1 encode
...
Need to get rid of these as they allocate buffers for drivers
not implementing create_dpb_buffer and waste memory.
No driver is using these fields anymore.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520 >
2024-10-10 09:02:20 +00:00
David Rosca
454a26662d
frontends/va: Support raw packed headers for AV1
...
When there is show_existing_frame = 1 frame header, we don't parse
it and instead output directly as raw header. Only the frame header
that will be used for encoding current frame is parsed and indicated
with is_slice.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520 >
2024-10-10 09:02:20 +00:00
David Rosca
1fdd773450
frontends/va: Parse more AV1 frame and sequence header params
...
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520 >
2024-10-10 09:02:20 +00:00
David Rosca
36ddcc130b
frontends/va: Implement DPB management for AV1
...
Same logic as H264 and HEVC, except surfaces are evicted immediately.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520 >
2024-10-10 09:02:20 +00:00
Mike Blumenkrantz
d008aaa6da
gallium: rework vbuf alignment pipe caps
...
this consolidates 4 pipe caps into 1 using an enum
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31482 >
2024-10-07 13:09:59 +00:00
David Rosca
be9b9c5fc4
pipe: Remove video get_*_fence
...
Replaced now with fence_wait.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442 >
2024-10-03 17:04:26 +00:00
David Rosca
3cec5a84ca
pipe: Add video fence_wait
...
This will be used to replace get_*_fence functions.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442 >
2024-10-03 17:04:26 +00:00
Mike Blumenkrantz
8494849b92
vl: add pipe_video_buffer::flags to sync up with pipe_resource::flags
...
Reviewed-by: David Rosca <david.rosca@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319 >
2024-10-01 17:00:39 +10:00
Dave Airlie
caafa50af6
va: add some h264 fields
...
Reviewed-by: David Rosca <david.rosca@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319 >
2024-10-01 17:00:36 +10:00
Erik Faye-Lund
4ae273dcf4
mesa: make compressed-format emulation optional
...
There's good reasons to emulate compressed formats; mobile and desktop
HW generally have different ideas of what formats are worth the extra
silicon, so they support different formats based on the legacy they were
designed to support. This means we can get better application
compatibility by emulating these formats.
But, that comes at a price, namely that applications that supports
multiple formats don't really have a way to detect which ones are
natively supported and which ones are not. This means they might make
the wrong choice, and end up wasting memory and bandwidth when that
could have been avoided.
So let's make the emulation optional, by introducing a DRIconf variable
to disable it.
This intentionally still leaves in place transcoding support, because
that's still *probably* a win. Besides, those needs to be opted into
anyway.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: David Heidelberg <david@ixit.cz >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31420 >
2024-09-30 17:18:19 +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
Mike Blumenkrantz
f4aab9984b
gallium: delete pipe_screen::is_compression_modifier
...
this is unused
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024 >
2024-09-25 02:30:40 +00:00
Sil Vilerino
5e22ddacb6
pipe: Add temporal_id to pipe_h26x_enc_dpb_entry
...
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268 >
2024-09-20 15:50:41 +00:00
Mike Blumenkrantz
5c5763f6a8
gallium: add PIPE_CAP_MULTIVIEW
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128 >
2024-09-18 13:07:41 +00:00
Marek Olšák
328c29d600
mesa,glsl,gallium: add GL_OVR_multiview
...
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128 >
2024-09-18 13:07:41 +00:00
David Rosca
e27eeff95d
frontends/va: Remove fallback if app doesn't enable packed headers
...
This was only a best effort fallback and it doesn't always work.
Driver is expected to only output slice NALs when packed headers
are not enabled, so let's just do that.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31126 >
2024-09-16 06:35:32 +00:00
David Rosca
379dd3ff52
pipe: Remove unused fields in video rate control
...
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992 >
2024-09-12 22:50:21 +00:00
Sil Vilerino
0161b98955
pipe: Add HEVC encode range extension caps, SPS and PPS params
...
Reviewed-By: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117 >
2024-09-10 23:06:34 +00:00
Sil Vilerino
1c490a79f2
pipe: Remove renew_headers_on_idr, insert_aud_nalu unused params
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114 >
2024-09-10 19:16:15 +00:00
David Rosca
69c18607a9
pipe: Remove video enc header_flags
...
This is now replaced with raw headers.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927 >
2024-09-10 11:58:26 +00:00
David Rosca
12f60c1cd1
frontends/va: Allow multiple NALUs in coded buffer segments
...
Add PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_SINGLE_NALU to set
VA_CODED_BUF_STATUS_SINGLE_NALU for each segment.
Always set this flag in d3d12 to keep the old behavior.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927 >
2024-09-10 11:58:26 +00:00
David Rosca
1866f4d899
frontends/va: Support raw packed headers for H264 and HEVC
...
Make all packed headers received from application available
to drivers. Add emulation prevention bytes if the packed header
was sent without them, so the driver will always get the headers
with emulation prevention bytes and is able to directly copy them
to output bitstream as is.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927 >
2024-09-10 11:58:25 +00:00
David Rosca
20f9418478
pipe: Add pipe_h264_nal_unit_type and pipe_h265_nal_unit_type enums
...
This will also be useful for drivers.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927 >
2024-09-10 11:58:25 +00:00
Konstantin Seurer
aa072b137b
gallium,st/mesa: Add and set pipe_image_view::is_2d_view_of_3d
...
This will be useful for lavapipe since the Z-coordinate has to be
ignored for 2D view accesses.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31038 >
2024-09-09 13:41:35 +00:00
Pierre-Eric Pelloux-Prayer
c9806b3595
gallium: add pipe_screen::get_driver_pipe_screen
...
pipe_resource has a screen pointer, and some drivers expect to be able
to cast it to their specialized version.
This works fine until one of the debug driver is used, because in this
case the driver's pipe_screen subclass can't be obtained with a simple
cast.
To overcome this limitation, this commit introduce a new function with
a default implementation to get the real driver pipe_screen from the
generic interface.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587 >
2024-09-09 09:13:51 +00:00
David Rosca
cd2562117a
frontends/va: Parse more H264 PPS for transform_8x8_mode_flag
...
Also use constrained_intra_pred_flag from pic params.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31020 >
2024-09-07 04:48:18 +00:00
Sil Vilerino
fed08a4ac8
Fix definitions of PIPE_BIND_VIDEO_DECODE/ENCODE_DPB as they conflict with PIPE_BIND_SCANOUT and PIPE_BIND_SHARED
...
Fixes: f8145fe691 ("pipe: Add PIPE_BIND_VIDEO_DECODE_DPB/PIPE_BIND_VIDEO_ENCODE_DPB")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31067 >
2024-09-06 18:53:11 +00:00
Sil Vilerino
7c8ffc34aa
pipe: Add PIPE_H26X_MAX_REFERENCES
...
Reviewed-By: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017 >
2024-09-04 22:07:33 +00:00
Sil Vilerino
9c0b36eef2
pipe: Add pipe_h264_enc_pic_control.temporal_id
...
Reviewed-By: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30945 >
2024-09-03 16:31:02 +00:00
Sil Vilerino
f8145fe691
pipe: Add PIPE_BIND_VIDEO_DECODE_DPB/PIPE_BIND_VIDEO_ENCODE_DPB
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908 >
2024-08-30 02:12:28 +00:00
David Rosca
e751cb074a
frontends/va: Allow drivers to allocate and use encode DPB surface buffers
...
Drivers can now allocate these buffers and use them directly.
(cherry picked from commit a4ef6eccb5c78c8080a944d8dd08f829902afc60)
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30843#note_2544865
for more details about discussion/cherry-picking.
Signed-off-by: David Rosca <david.rosca@amd.com >
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908 >
2024-08-30 02:12:28 +00:00
David Rosca
de61cb72fe
pipe: Use correct struct for h264/h265 dpb entry
...
Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30843 >
2024-08-28 15:37:10 +00:00
David Rosca
db45d16dfe
pipe: Add int return value to video end_frame
...
Make it possible to report errors to frontend.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780 >
2024-08-28 13:38:52 +00:00
David Rosca
96fe9fde3f
frontends/va: Implement sync buffer/surface timeout for encode feedback
...
Same as processing/decode, the driver will assign fence to
pipe_picture_desc::fence and frontend will wait on it with
get_feedback_fence.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780 >
2024-08-28 13:38:52 +00:00
Qiang Yu
661b9061d4
gallium: add caps for KHR_shader_subgroup
...
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610 >
2024-08-26 10:46:16 +08:00