Commit graph

179998 commits

Author SHA1 Message Date
Karol Herbst
56f934103d radeonsi: support importing arbitrary resources
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:43 +00:00
Antonio Gomes
7e031078dd rusticl: Advertise cl_khr_gl_sharing extension
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
59287a1223 rusticl: Flush objects just before importing them
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
1c3dde7ba6 rusticl: Add support for cube maps
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
2645003bdc rusticl: Create CL mem objects from GL
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
0bafe8be2c rusticl/format: Add conversion table for GL->CL
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
57dfc013a6 rusticl: Add functions to create CL ctxs from GL, and also to query them
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
425d7acd4a rusticl/device: Enable gl_sharing only if create_fence_fd is implemented
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
7bb131964b rusticl/device: Function to check for gl interop support
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
c4c58aa26f rusticl: Add xplat helpers to dynamic link interop functions
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
1396dc1c38 mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
663cef26d0 mesa/st: Add new data to mesa_glinterop
* Version 3 of mesa_glinterop_device_info
* Export device uuid
* Version 2 of mesa_glinterop_export_out
* Export texture sizes
* Export whandle.modifier
* Export whandle.stride
* Add PIPE_HANDLE_USAGE_EXPLICIT_FLUSH in interop_export_objects

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
d52f35fa1a iris: Fixups in resource_get_handle and resource_from_handle
* Add support for PIPE_BUFFER in resource_from_handle.
* Flush batches after reallocate_resource_inplace:
  If we're dealing with a PIPE_BUFFER, iris_flush_resource doesn't
  flush the batch and we export the resource with pending commands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
df0623e51a rusticl, meson: Add gl/egl/glx bindings
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Antonio Gomes
bcd7538d03 rusticl, meson: Move libc functions to their own crate
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:42 +00:00
Yonggang Luo
84db4d5698 micosoft: decouple microsoft vulkan driver and compiler from gallium
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440>
2023-11-04 00:02:59 +00:00
Yonggang Luo
8bcb996a88 micosoft: define enum dxil_tex_wrap to avoid the usage of enum pipe_tex_wrap
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440>
2023-11-04 00:02:59 +00:00
Yonggang Luo
a36ad49e0e microsoft/clc: Use 128 instead of PIPE_MAX_SHADER_SAMPLER_VIEWS
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440>
2023-11-04 00:02:59 +00:00
Yonggang Luo
1181c2509d microsoft/clc: Using sampler_id instead PIPE_MAX_SHADER_SAMPLER_VIEWS for dxil_lower_sample_to_txf_for_integer_tex
Because sampler_id is the real number of samples.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440>
2023-11-04 00:02:59 +00:00
Jesse Natalie
e51acb65ac dzn: Fix memory type sorting
For a dGPU, we should have:
1. RAM
2. RAM + write-combined CPU access
3. RAM + cached CPU access
4. VRAM

Eventually there'll be VRAM + write-combined CPU access after 4, using "GPU upload heaps"

For an iGPU, we should have:
1. RAM (declared as device-local)
2. RAM + write-combined CPU access (declared as device-local)
3. RAM + cached CPU access (declared as device-local)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26037>
2023-11-03 23:33:02 +00:00
Dave Airlie
c8e39683da vulkan/video: add h265 header encoders.
Vulkan video has parameter overrides, where the	driver can override the
driver provided	parameters with	an encoded bitstream where it has made
changes.

This is	the support code to encode the bitstream headers for h265
from parameters	(vps/sps/pps).

Acked-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:37 +00:00
Dave Airlie
d46162981a vulkan/video: add h264 headers encode
Vulkan video has parameter overrides, where the driver can override the
driver provided parameters with an encoded bitstream where it has made
changes.

This is the support code to encode the bitstream headers for h264
from parameters (sps/pps).

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:37 +00:00
Dave Airlie
8243145f02 vulkan/video: add a h265 level translator.
This just converts the protocol level to the spec level encoding.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:37 +00:00
Dave Airlie
5542b51aff vulkan/video: add h264 level idc convertor utility
This converts vulkan level to the bitstream encoding.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:37 +00:00
Dave Airlie
1782ab4d8b util: add a bitstream encoder for video stream headers.
This is based on the d3d12 code, and is mostly a rewrite in C,
these are just some helpers to use for writing h264 and h265
headers for vulkan encode.

Acked-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
Dave Airlie
72f52329cd vulkan/video: add a nal_unit lookup for hevc
This is needed to by drivers to get a nal unit type
for the picture type.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
Dave Airlie
fee258de27 vulkan/video: add h264 nal enum
This will be used later for header encoding.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
Dave Airlie
8dd97080d8 vulkan/video: add h265 encode support
This just adds the session and parameter handling for h265 encode.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
Dave Airlie
5cb46f1ce7 vulkan/video: add support for h264 encode to common code
This adds support for the h264 encode session and parameter storage.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
Dave Airlie
b84c58d727 vulkan: update video headers
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25874>
2023-11-03 22:59:36 +00:00
José Expósito
8a635e516e zink: Fix crash on zink_create_screen error path
The `zink_internal_create_screen()` function can fail before
`screen->loader_lib` and/or `screen->instance` are initialized.
The `zink_destroy_screen()` doesn't check those cases and crashes.

The error was found by Fedora's CI. The back trace is available at [1].

[1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-c39f82c465

Fixes: 0c2045553f ("zink: use screen destructor for creation fails")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26029>
2023-11-03 22:37:43 +00:00
Faith Ekstrand
5a85f67fa4 nvk: Assert no storage images on Kepler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
2023-11-03 21:53:33 +00:00
Faith Ekstrand
d5753a89a6 nvk: Drop a bogus assert
We've supported storageImageReadWithoutFormat for a while.  Also, thanks
to the fact that the assert assumed image_deref_load and happened after
nir_rewrite_image_intrinsic, it would never trigger.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
2023-11-03 21:53:33 +00:00
Faith Ekstrand
0ce49d4347 nvk: Fix nvk_heap_free() for contiguous heaps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
2023-11-03 21:53:33 +00:00
Faith Ekstrand
57d6722d79 nvk: Force all mappable BOs into GART pre-Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
2023-11-03 21:53:33 +00:00
Yonggang Luo
5e9dcffffd nvk: Should use alignment instead of align
align is a function, don't know why align > 0 is working

Fixes: 87686a2220 ("nvk: Rework side-band data upload")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
2023-11-03 21:53:33 +00:00
Daniel Stone
80b87c18d1 ci: Try really hard to print final result string
a630 has been completing jobs, and then corrupting the very last line of
UART output - the one where we pass the overall result back from the DUT
to the job. The bare-metal monitor will wait for this line to appear,
never see it, and then the job times out.

Since this line is the most critical one of all to get out, just spam
the prints to try to make sure they get through.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26032>
2023-11-03 21:17:42 +00:00
Eric Engestrom
c826f70c37 rpi4/ci: remove spec@!opengl 1.1@depthstencil-default_fb-drawpixels-32f_24_8_rev samples=2 from fails as it's a flaky test and already marked as such
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25974>
2023-11-03 20:57:31 +00:00
Eric Engestrom
ed90430027 rpi4/ci: move spec@!opengl 1.1@depthstencil-default_fb-drawpixels-24_8 samples=2 from fails for flakes after an UnexpectedPass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25974>
2023-11-03 20:57:31 +00:00
Eric Engestrom
9f281899dc rpi4/ci: add more known dEQP-EGL.functional.*.*_context.gles*.other failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25974>
2023-11-03 20:57:31 +00:00
Jesse Natalie
67df2f29eb vulkan: Support loader interface v7
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998>
2023-11-03 20:01:14 +00:00
Jesse Natalie
228329f4da vulkan: Consolidate common ICD methods
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998>
2023-11-03 20:01:14 +00:00
Jesse Natalie
32f0034ec9 vulkan: Remove no-longer-needed prototypes for ICD entrypoints
The comment around these is no longer true, vk_icd.h does in fact
have prototypes for these functions.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998>
2023-11-03 20:01:14 +00:00
David Rosca
af2980e5b9 radeonsi/uvd_enc: Add VUI parameters in output bitstream
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:01 +00:00
David Rosca
72fadf5faf radeonsi/vce: Add VUI parameters in output bitstream
This enables VUI parameters and sets aspect ratio, video format,
video full range, colour description and chroma location.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:01 +00:00
David Rosca
5f70379e0d radeonsi/vce: Tweak motion estimation params for better quality
This gives better video quality while not slowing down the encoding
speed too much (less than 10% slower).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:01 +00:00
David Rosca
8dda860f83 Revert "radeon/radeon_vce: fix out of target bitrate in CBR mode (H.264)"
This reverts commit f7e7cf637e.

It is now possible to change the buffer size from VA frontend, so this
is no longer needed and instead it's up to applications to set
appropriate value.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00
David Rosca
bf95000d74 radeonsi/uvd_enc: Fix leaking session info buffer
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00
David Rosca
9feff3d695 radeonsi/uvd_enc: Implement destroy_fence vfunc
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00
David Rosca
007ff4ea00 radeonsi/uvd: Implement destroy_fence vfunc
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00