Commit graph

192902 commits

Author SHA1 Message Date
Karol Herbst
43365502c4 nouveau: implement driver_uuid and device_uuid
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11592
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
826d00617c nouveau: add nv_device_uuid
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
9c15875d4d nouveau: use nv_devince_info and fill in PCI and type information
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
fb1763e93c nouveau/winsys: fix handling of NV_DEVICE_TYPE_IGP
It's a PCI device as well, just no discrete VRAM.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
740cae64a1 mesa: check for enabled extensions for *UID enums
Applications might use them without checking if the extension is supported
and would run into a NULL pointer deref calling the callbacks.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Aleksi Sapon
66f48f2216 llvmpipe: half_to_float use LLVM fpext when fp16 is available
Generalize the use of LLVM's fpext for converting fp16 <-> fp32
to any target machine that supports fp16, instead of only checking
for a specific x86 extension. This enables the use of fcvtl on Aarch64.
More architectures could be supported by updating lp_has_fp16().

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:03 +00:00
Aleksi Sapon
2db280b208 llvmpipe: much faster sample function cache using RCU pointers
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:02 +00:00
Aleksi Sapon
7c6a8973bf util: const hash_table for some readonly operations
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:02 +00:00
Matt Turner
66243e6999 docs: Drop references to LIBGL_DRIVERS_PATH
Fixes: 93511c1c5c ("gbm: link directly with libgallium")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11556
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30456>
2024-08-02 14:08:42 +00:00
Konstantin
cbf07628bc vtn: Remove dead shader_call_data from all RT stages
Having multiple shader_call_data can cause incorrect behavior since the
compiler expects there to be only one shader_call_data variable.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11585
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30468>
2024-08-02 12:30:53 +00:00
Valentine Burley
fb03aed435 tu: Drop tu_vk_format_to_pipe_format helper function
All the fomats are properly handled in vk_format_to_pipe_format so this
is no longer needed.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30269>
2024-08-02 10:11:09 +00:00
Valentine Burley
7fe8033e8b tu, fdl: Drop custom mapping for 1-plane YCbCr formats
This workaround for VK_FORMAT_G8B8G8R8_422_UNORM and VK_FORMAT_B8G8R8G8_422_UNORM
is no longer needed after the formats in vk_format_to_pipe_format now return the
RGB formats since the following commits:

0c03d44093 ("util/format: Add G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM formats")

4accbb27a2 ("vulkan/format: Translate G8B8G8R8_422_UNORM and B8G8R8G8_422_UNORM properly")

Turnip's behavior is already aligned with the new PIPE_FORMAT names, not what the
old ones would suggest.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30269>
2024-08-02 10:11:09 +00:00
Daniel Stone
cd961a7e3f gbm/dri: Remove erroneous assert
The user is allowed to pass a list of modifiers including
DRM_FORMAT_MOD_INVALID, meaning that the user is OK with implicit
modifiers. Since merging the DRI interfaces, this assert that we are
never returning an implicit modifier is unnecessary and also wrong. It
was originally added to be super-safe, but we now know that our drivers
work very well with modifiers, so don't need it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 0b16d7ebb9 ("dri: Allow INVALID for modifier-less drivers")
Closes: mesa/mesa#11591
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30464>
2024-08-02 08:40:43 +00:00
Hyunjun Ko
78ff100a52 anv: support h265 encoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
eefa886b01 anv/video: initial support for h265 encoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3bd46afac1 anv/query: consider codec when querying the encoding status.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
22abbb84b7 vulkan/video: adds a bitstream writer of h265 slice header
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
52f678004f intel/decoder: Handle HCP_PAK_INSERT_OBJECT
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
46e02ee861 intel/genxml: adds a value of reference pic to HCP_SURFACE_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
7f280e1e93 intel/genxml: fix some length of HCP_FQM_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
663f9eb740 intel/genxml: Adds more VDENC commands
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3eb69b9577 intel/genxml: fix the length of VDENC_DS_REF_SURFACE_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
e79cad5af0 intel/genxml: Add missing fields for HCP_SLICE_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
e28a299863 anv: enable VK_KHR_video_encode_queue and VK_KHR_video_encode_h264
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Dave Airlie
3fbcd95b20 anv/video: add mode costs for h264 encoding
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3ec8f7f995 anv/video: initial support for h264 encoding
Co-authored-by: Dave Airlie <airlied@redhat.com>

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
f6c3e82201 anv/video: implemnt VkGetEncodedVideoSessionParametersKHR
Also add a stub for VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
f25cf314b3 anv/video: remove unnecessary macros
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
a660bd9471 anv/query: handle VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR
Anv supports VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR
and VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR.

Also add to handle the VK_QUERY_RESULT_WITH_STATUS_BIT_KHR flag.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
ff8de61907 vulkan/video: adds a bitstream writer of h264 slice header
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
9425ba6f2b intel/genxml: update VDENC instructions
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
b97d440bc5 intel/genxml: change the length of MFX_QM_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:58 +00:00
Hyunjun Ko
5057a33fe3 intel/genxml: add a missing value for MFX_SURFACE_STATE
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:58 +00:00
dawnhan
6df5ace3a3 vulkan/android: Add missing AHB formats
Signed-off-by: dawnhan <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30310>
2024-08-02 04:23:44 +00:00
David Heidelberg
ceece45b2b freedreno: drop hack for old dEQP
Since ac7a167b56d7 ("Adjust out of surface verification for wide lines")
from 2017, this shouldn't be necessary anymore.

Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30460>
2024-08-02 10:18:50 +09:00
Kenneth Graunke
8bca7e520c intel/brw: Only force g0's liveness to be the whole program if spilling
We don't actually need to extend g0's live range to the EOT message
generally - most messages that end a shader are headerless.  The main
implicit use of g0 is for constructing scratch headers.  With the last
two patches, we now consider scratch access that may exist in the IR
and already extend the liveness appropriately.

There is one remaining problem: spilling.  The register allocator will
create new scratch messages when spilling a register, which need to
create scratch headers, which need g0.  So, every new spill or fill
might extend the live range of g0, which would create new interference,
altering the graph.  This can be problematic.

However, when compiling SIMD16 or SIMD32 fragment shaders, we don't
allow spilling anyway.  So, why not use allow g0?  Also, when trying
various scheduling modes, we first try allocation without spilling.
If it works, great, if not, we try a (hopefully) less aggressive
schedule, and only allow spilling on the lowest-pressure schedule.

So, even for regular SIMD8 shaders, we can potentially gain the use
of g0 on the first few tries at scheduling+allocation.

Once we try to allocate with spilling, we go back to reserving g0
for the entire program, so that we can construct scratch headers at
any point.  We could possibly do better here, but this is simple and
reliable with some benefit.

Thanks to Ian Romanick for suggesting I try this approach.

fossil-db on Alchemist shows some more spill/fill improvements:

   Totals:
   Instrs: 149062395 -> 149053010 (-0.01%); split: -0.01%, +0.00%
   Cycles: 12609496913 -> 12611652181 (+0.02%); split: -0.45%, +0.47%
   Spill count: 52891 -> 52471 (-0.79%)
   Fill count: 101599 -> 100818 (-0.77%)
   Scratch Memory Size: 3292160 -> 3197952 (-2.86%)

   Totals from 416541 (66.59% of 625484) affected shaders:
   Instrs: 124058587 -> 124049202 (-0.01%); split: -0.01%, +0.01%
   Cycles: 3567164271 -> 3569319539 (+0.06%); split: -1.61%, +1.67%
   Spill count: 420 -> 0 (-inf%)
   Fill count: 781 -> 0 (-inf%)
   Scratch Memory Size: 94208 -> 0 (-inf%)

Witcher 3 shows a 33% reduction in scratch memory size, for example.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:34 -07:00
Kenneth Graunke
4ca4b064cf intel/brw: Record g0 as live for sends with send_ex_desc_scratch set
brw_send_indirect_split_message() implicitly reads g0 to construct the
extended message descriptor for certain send messages when this is set.

Record that liveness explicitly.

Thanks to Francisco Jerez for reminding me about this use of g0.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:32 -07:00
Kenneth Graunke
9200fb966c intel/brw: Record that SHADER_OPCODE_SCRATCH_HEADER uses g0
The generator code for emitting legacy scratch headers was implicitly
using g0 as a source.  But the IR wasn't indicating any usage of g0,
which means the liveness isn't properly tracked at the IR level.

It works because we reserve g0 as permanently live for the whole
program.  In order to stop doing that, we need to record it properly.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:31 -07:00
Kenneth Graunke
545f20419f intel/brw: Delete fs_reg_alloc::discard_interference_graph()
Unused since commit 50519598ff.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:28 -07:00
Eric Engestrom
f427c9fe23 rpi3/ci: remove {version,render}_check from [piglit.env]
v1 was moving it into the [[piglit]] section, but piglit-runner actually
doesn't support checking for this, so let's just remove it entirely.

Fixes: 3990463c48 ("v3d/vc4/ci: set full renderer version check")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30436>
2024-08-01 21:05:27 +00:00
Lucas Fryzek
c44d65a467 lp: only map dt buffer on import from dmabuf
Adjusts `resource_from_handle` to follow original execution path
in cases where we are not importing a dmabuf.

Fixes: db38a4913e

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30441>
2024-08-01 20:39:06 +00:00
Eric Engestrom
93f9afa1e0 ci: remove dead start-x.sh script
Fixes: 599e8bf921 ("ci/valve: remove the traces runner")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30465>
2024-08-01 19:57:17 +00:00
Faith Ekstrand
30888d1e5c vulkan: Update XML and headers to 1.3.292
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30473>
2024-08-01 18:59:33 +00:00
David Rosca
c0a9cdc4de radeonsi/vcn: Allow dynamic change of QVBR quality level
This was missed when QVBR was added.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30471>
2024-08-01 18:31:39 +00:00
Karol Herbst
0e05ae1a10 rusticl/kernel: handle load_global_size
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Karol Herbst
4ae9ee7a2c rusticl/kernel: emit system values with the correct device size
Those are sized according to the size_t on the device.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Karol Herbst
14ea102175 nir: add load_global_size intrinsic
There is no need to compute it in the shader as the result is known at
runtime already.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Juston Li
ef58f2408f anv/android: handle R8G8B8X8 as R8G8B8A8
Fall through to common vk_ahb_format_to_image_format() to handle
R8G8B8X8 as R8G8B8A8.

Fixes issues with querying for format feature support when its handled
as R8G8B8.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30080>
2024-08-01 17:20:18 +00:00
Mike Blumenkrantz
827812912d dri: link with libloader
this has always called loader_bind_extensions, so it should have been
linking with the loader

cc: mesa-stable

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
2024-08-01 16:01:17 +00:00
Mike Blumenkrantz
c5c0c1215b glx: include src/gallium for apple
Fixes: 91e1ea52c9 ("mesa_interface: Move out of GL/internal/")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
2024-08-01 16:01:17 +00:00