Commit graph

194627 commits

Author SHA1 Message Date
Sil Vilerino
26a02b7df7 d3d12: Add HEVC support for on demand AUD NALUS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +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
Sil Vilerino
7df39b802d d3d12: Support for on demand vps, sps, pps, aud headers requests from frontend
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00
Caio Oliveira
eb68e6e84c anv: Advertise VK_KHR_compute_shader_derivatives
This was promoted from VK_NV_compute_shader_derivatives.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
eae637d83c spirv: Allow Mesh/Task to use derivative execution modes
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
1e7f1c2039 nir: Allow Mesh/Task to use implicit LOD when DERIVATIVE_GROUP is set
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
1cece2691f spirv: Prefer symbols from Khronos extension for compute shader derivatives
The extension was promoted, start using the KHR instead of
vendor-specific symbols.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
155c614c52 spirv: Update headers and metadata from latest Khronos commit
This corresponds to 2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801
("Add Capability and Execution mode SPV_KHR_compute_shader_derivatives (#446)")
in https://github.com/KhronosGroup/SPIRV-Headers.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
807aa97a12 vulkan: Update XML and headers to 1.3.295
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Bernhard Rosenkränzer
397adfd453 dril: Fix return types of peglInitialize and peglTerminate
Fix return types of peglInitialize and peglTerminate to match
eglInitialize and eglTerminate

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31106>
2024-09-10 17:36:41 +00:00
Samuel Pitoiset
b4ae6eb5fc radv: use radv_upload_indirect_descriptor_sets() in DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
7be965bf17 radv: stop allocating upload space for indirect descriptors with DGC
The indirect descriptors are uploaded from the CPU and nothing needs
to be allocated in the DGC buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
31875e92aa radv: make the helper that uploads indirect descriptors non-static
It will be used by DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
3deebeb20a radv: unify emitting non-indirect/indirect descriptor sets
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
bac5ad9f8d radv: rename radv_emit_descriptor_pointers() to radv_emit_descriptors_per_stage()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
2c2735083b radv: store the indirect descriptor sets VA to the descriptor state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
529d7ebdcc radv: cleanup some functions that emit shader user SGPRs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Pierre-Eric Pelloux-Prayer
ed781c7403 frontends/va: honor DRI_PRIME for VA_DISPLAY_WAYLAND
This matches the X11 behavior. Other display types are unaffected.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8069
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31012>
2024-09-10 14:32:23 +00:00
Pavel Ondračka
286bac97ad r300: remove nir_opt_load_store_vectorize
This is another remnant from ntt times, and at this point we have
everything as ubo_vec4 so this had zero effect anyway (and there was a
bug in the callback function as a bonus, but it got never called luckily).

No shader-db changes.

Fixes the r300 part of https://gitlab.freedesktop.org/mesa/mesa/-/issues/11350

Reviewed-by: Filip Gawin <filip@gawin.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30890>
2024-09-10 13:33:58 +00:00
Pavel Ondračka
c8c1cec1f7 ttn: unconditionally call nir_shader_gather_info
Mesa st always calls this and thus some drivers expect to have the
info. This fixes assertions in NineTests on iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6946
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Tested-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27460>
2024-09-10 12:38:46 +00:00
Pavel Ondračka
3b73c80280 ttn: use nir_shader_get_entrypoint in nir_shader_gather_info
To fix crash with serialized NIR in some circumstances.

Acked-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27460>
2024-09-10 12:38:46 +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
a308360fd4 radeonsi/vcn: Don't copy the pipe enc structs
There is no need to copy them, frontend calls begin_frame immediately
followed by encode_bitstream so we can use it directly.

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
96f3daeaeb radeonsi: Remove unused radeon_temporal.h
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
c43f8cb0b9 radeonsi/vcn: Support raw packed headers for H264 and HEVC
This works by copying the input headers at the beginning of the output
bitstream buffer. VPS/SPS/PPS are still written by driver and slice
headers are written by FW, but all other headers are directly copied
from application input.

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
David Heidelberg
6bf7b5bcd8 nir_lower_mem_access_bit_sizes: Assert when 0 components or bits are requested
Prevent the accidental passing of 0 components or bits, as it makes no sense.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Suggested-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31103>
2024-09-10 11:17:48 +00:00
Karol Herbst
45b531fdfc rusticl: add nir debugging option
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
f098620c21 rusticl/kernel: add optimized Kernel variant
By default we have to take into account that the application could set
offsets, or that one kernel launch won't fit into a single hw dispatch.

In order to mitigate the overhead it causes at kernel runtime, and because
those things are in most cases irrelevant, we compile an optimized kernel
making a few assumptions.

We also make use of the the workgroup_size_hint as an additional
optimization.

This should speed up relatively small kernels significantly as it can cut
the instruction count in half for those.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
59f63381d4 rusticl/kernel: add CompilationResult to hold compilation artifacts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
41100e3743 rusticl/kernel: track if arg is dead inside CompiledKernelArg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
6cf74419fe rusticl/kernel: split up nir compilation into various steps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
36550d9da3 rusticl/kernel: move assign_locations into CompiledKernelArg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
76b2236834 rusticl/mesa: implement Clone for NirShader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
89b2c3927e rusticl/mesa: add more workgroup_Size functions to NirShader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
8383c727b2 rusticl/platform: add env variable to disable kernel variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
634366e1dc rusticl/kernel: move dead_var options into constant space
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Erik Faye-Lund
b59b2d4bfa mesa/main: tighten gl-version checks
If we allow this whenever the extension is supported by the driver, we
end up allowing out-of-spec behavior for instance on GLES 1.x.

So let's tighten these checks to consider the current API, by using the
new helpers.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Erik Faye-Lund
9068e4415a mesa/main: tighten glsl-version checks
We don't want to expose GLSL versions above what should be exposed for
the current API, otherwise we allow out-of-spec behavior.

This is unlikely to have any real-world effect, because most of the
time, the version is the highest supported. It's only if the version is
artificially limited that this should matter.

But it's also a bit cleaner this way.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Erik Faye-Lund
97b8febf3d mesa/main: add gles-compatible check helpers
We need to perform these checks fairly often; let's create helpers for
them.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Daniel Schürmann
dfc13fcf9f aco: introduce Operand flag 'CopyKill'
This flag indicates that the Operand must be copied in order to satisfy register
constraints. The copy is immediately killed by the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
91f65d5935 aco/live_var_analysis: use Clobbered flag to calculate additional operand demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
5a6fa8a8eb aco: introduce new Operand flag 'Clobbered'
This flag indicates that the Operand's register gets clobbered by the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
1c14013b9e aco/live_var_analysis: Don't attempt to re-insert the same temporary twice into live set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Samuel Pitoiset
e621f0c173 radv: rework emitting indirect compute pipelines with DGC
Instead of recreating the packets in the DGC prepare shader, the best
solution is to emit them to a temporary CS object at pipeline creation
time. Then in the DGC prepare shader, the driver just needs to copy
the packets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31101>
2024-09-10 09:13:44 +00:00
Samuel Pitoiset
8802612458 radv: advertise VK_KHR_pipeline_binary
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
b4d6d88c6b radv: add support for importing pipeline binaries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
96a300a3f0 radv: add support for capturing pipeline binaries
When VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR is set, implementations
shouldn't store pipeline data to an internal cache.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00