Commit Graph

193086 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz
019cb3875d glx: move up glx_driver enum declaration
Fixes: 4e8740370a ("glx: rework __glXInitialize")

Acked-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
1b6974095c loader/dri3: delete loader_dri3_extensions
no longer used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
c23385c42c glx: delete DRI_IMAGE remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
546d71044a loader/dri: delete DRI_IMAGE remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
d703e7f289 loader/dri3: inline DRI_IMAGE usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
35d518fcde dri: use image loader function directly in dri_create_image_with_modifiers
it can't be anything else

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
2b042cb9c2 gallium: move loader_dri_create_image to dri frontend
this is another case of bad dependencies leaving dri the only place to
move something, which then exposes some other snags to be resolved later

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
10a80782e0 dri: make DRI_IMAGE public
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
7dded1ad88 glx: simplify DRI_IMAGE checks
this is guaranteed to be present and work and stuff

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
defe9e3585 glx: expose GLX_MESA_gl_interop for drisw
let the drivers determine support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
4cd4b9f70d glx: stop binding DRI_INTEROP
no longer useful since innermost functions return errors correctly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
410076af84 glx: call dri interop functions directly
removes pointless layers of abstraction and deletes a bunch of code

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
634dea8f70 glx: delete more DRI_INTEROP checks
inner functions should return support correctly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
51a2755f4f glx: delete checks for interop support
the inner functions now return support correctly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
b421abafbb glx: inline DRI_INTEROP
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
012d20c6a3 dri: make DRI_INTEROP public
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00