Commit Graph

155088 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer bce227611d va/surface: set the correct size in vaExportSurfaceHandle
The size must be the size of the total object, not the size
of the resource.
For instance, when using a single object for a multi-plane
format, the size of each plane should be equal to the size
of the underlying object to match libva's documentation:

        /** Total size of this object (may include regions which are
         *  not part of the surface). */
        uint32_t size;

Fixes: 13b79266e4 ("frontend/va: Setting the size of VADRMPRIMESurfaceDescriptor")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813>
2022-06-08 09:42:44 +02:00
Pierre-Eric Pelloux-Prayer 8c07d7cbdd gallium: add size attribute to winsys_handle
This is needed at least for the VA-API frontend where the exporter
needs to know the total size of the object.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813>
2022-06-08 09:42:42 +02:00
Pierre-Eric Pelloux-Prayer baf0e66dae gallium: update winsys_handle documentation
The function names are resource_***_handle, not textures_***_handles.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813>
2022-06-08 09:42:26 +02:00
Mike Blumenkrantz cb5973a3dd zink: only update layout when doing mixed zs attachment renderpass check
avoid doing any sort of extra work here and avoid multi-context weirdness

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900>
2022-06-08 02:55:05 +00:00
Mike Blumenkrantz 8f9c21b15e zink: break out of zs mixed layout update loop when work is done
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900>
2022-06-08 02:55:05 +00:00
Jordan Justen ffb0c97caf intel: Build mi_builder_test whenever build-tests is set
Previously `install-intel-gpu-tests` controlled this, but now
`install-intel-gpu-tests` will only be used to decide if it should be
installed.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16902>
2022-06-07 18:26:02 +00:00
Jason Ekstrand 04fae05f7d lavapipe: Use vk_image_buffer_copy_layout
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 420717b2ce panvk: Use vk_image_buffer_copy_layout
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 8d6b7eb5ce radv: Use vk_image_buffer_copy_layout
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand c144030f7e vulkan,radv: Steal some image offset/extent helpers from radv
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 81603e7dc2 anv: Use the common image<->buffer copy helper
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 80547e5379 vulkan: Add a helper for image<->buffer copies
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand ed0cd6f654 vulkan/format: Add a vk_format_get_aspect_format helper
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 69e4d39d18 vulkan,radv: Move vk_format_get_plane_format to common code
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:42 +00:00
Jason Ekstrand 1436fa55a6 radv: Use the common image offset/extent sanitize helpers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:41 +00:00
Jason Ekstrand 2c2b3e68e1 vulkan,anv: Move the image offset/extent sanitize helpers to common code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873>
2022-06-07 17:57:41 +00:00
Jason Ekstrand 4923458577 ttn: Populate the images/textures/samplers_used fields in shader_info
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6630
Fixes: 625b352f14 ("nir: Set image_buffers and msaa_images in lower_samplers_as_deref")
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16910>
2022-06-07 17:18:39 +00:00
Jesse Natalie f618d0292a d3d12: Report PIPE_CAP_ACCELERATED as 0 on WARP
Acked-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16892>
2022-06-07 16:00:23 +00:00
Yonggang Luo 0cb05d13b0 docs: Fixes dispatch.rst with __THREAD_INITIAL_EXEC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16858>
2022-06-07 14:55:14 +00:00
Rajnesh Kanwal 4dd5f03edc pvr: Remove clang-format off comment from vk_format.h
This enables clang formatting for vk_format.h. This was disabled
as we were using tabs for indentation and vk_format.h uses three
spaces for indentation.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:11 +01:00
Rajnesh Kanwal 9acb8ba3db pvr: Move transfer logic to pvr_job_transfer.[ch]
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:11 +01:00
Rajnesh Kanwal 16d4ca6e14 pvr: Add services winsys transfer cmd submit interface.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal df671f6a8f pvr: Change ALIGN macro to ALIGN_ATTR.
ALIGN is defined as a function in u_math.h and same name is
used to define a macro in pvr_rogue_fwif_shared.h. This commit
resolves this conflict.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 7a93e8900e pvr: Fix UTIL_ARCH_BIG_ENDIAN check in vk_format.h.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 2d0f49534f pvr: Restrict argument to dev_info where possible.
Avoid passing whole device structure. In most of the cases
we only need dev_info from device pointer to check for
features and ERNs.
This commits simply avoids the need to carry device pointer
where ever we go.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 4b6c18fea8 pvr: Fix ISP_RENDER_MODE_TYPE enum in rogue_cr.xml
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 11d8973efb pvr: Add transfer 3d parameter heap support.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 0c3c1a8be4 pvr: Remove vk_format_is_pure_integer and use common helper.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 72c634fb23 pvr: Allow signal_sync pointer to be NULL in job submission.
This allows the common driver to pass NULL signal_sync for cases
where there are multiple jobs (of the same type) to be processed.
In that case, it's useless to maintain the signal_syncs other than
the one returned by the last submission.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal ce36859b95 pvr: Add support for R32G32B32A32_UINT, R32_UINT and R8_UINT formats.
These formats are required by vkCmdCopyBuffer implementation. The
formats in pvr_format_table are exposed to applications as well.
Given these formats are supported for rendering and sampling, there
shouldn't be a problem exposing these to applications.

Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 86f703e7b1 pvr: Pass device info struct in pds generator.
Fixes a potential NULL pointer dereference.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Konstantin Seurer b24216c52d radv: Fix the accel struct size calculation
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16874>
2022-06-07 12:26:02 +00:00
Rhys Perry 062b5a9ba1 ac: use ResetAllOptionOccurrences instead of ResetCommandLineParser
Fixes -amdgpu-atomic-optimizations=true option.

From CommandLine.h:
/// Reset all command line options to a state that looks as if they have
/// never appeared on the command line.  This is useful for being able to parse
/// a command line multiple times (especially useful for writing tests).
void ResetAllOptionOccurrences();

/// Reset the command line parser back to its initial state.  This
/// removes
/// all options, categories, and subcommands and returns the parser to a state
/// where no options are supported.
void ResetCommandLineParser();

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 7e2874dc93 ("ac: reset LLVM command line parser")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16850>
2022-06-07 10:29:56 +00:00
Juan A. Suarez Romero 2c70b1a217 v3d: release all color buffers on context destroy
All of them must be released on context destroy, and not only the first
one.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16903>
2022-06-07 10:05:55 +00:00
Jordan Justen 8381f64251 intel: Fix build of mi_builder_tests by including c99_compat.h
We need this so C++ will understand "restrict" which is used in the
genxml output.

Fixes: 9f717b5f23 ("util: remove needless c99_compat.h includes")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16899>
2022-06-07 08:27:19 +00:00
Boris Brezillon c06b265ec7 dzn: Emit missing transition barriers for rendering attachments
VkRenderingAttachmentInitialLayoutInfoMESA provides information about
the initialLayout -> currentLayout that's expected when we begin a
render pass. Let's take it into account.

Fixes: 2d0798440b ("dzn: Add support for dynamic rendering")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16792>
2022-06-07 08:15:25 +00:00
Samuel Pitoiset f06da59fd7 radv: report the marketing name as part of the device name
This now reports something like "AMD Radeon RX 5700 XT (RADV NAVI10)".

This introduces a new variable for storing the marketing name because
the existing device name is used by the shaders cache and must remain
the same to avoid any issues with precompilation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4802
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11027>
2022-06-07 07:48:07 +00:00
Samuel Pitoiset 42b3735716 radv/winsys: add get_chip_name() to the null winsys
Make it return "Null hardware", this is just for RADV_FORCE_FAMILY.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11027>
2022-06-07 07:48:07 +00:00
Marek Olšák ad8f9d5d58 gallium: rename PIPE_CAP_MAX_SHADER_BUFFER_SIZE -> *_UINT
to imply the maximum of 4GB - 1.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:58 -04:00
Marek Olšák fd6b8999d7 gallium: rename PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE->MAX_TEXEL_BUFFER_ELEMENTS_UINT
to allow exposing 4G - 1. The "SIZE" was also a misnomer because it meant
elements. This no longer clamps the size to INT_MAX in st/mesa.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:58 -04:00
Marek Olšák dc4a3a18e9 gallium: add PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT for UBOs
We plan to report UINT32_MAX for UBOs.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák 406cf871b2 gallium: rename PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE to *_BUFFER0_*
UBOs will use a larger limit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák 2a151238a0 st/mesa: round down MaxUniformBlockSize to a multiple of 4 for piglit
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák 0081925856 st/mesa: limit MaxComputeWorkGroupCount to INT_MAX - 1 due to failing tests
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák 9c7256fb8d mesa: change GL_MAX_SHADER_STORAGE_BLOCK_SIZE to UINT
so that we can report 4G - 1.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák 939d2e0860 mesa: change GL_MAX_TEXTURE_BUFFER_SIZE to UINT
so that we can report 4G - 1.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák eaac8a1986 mesa: change GL_MAX_UNIFORM_BLOCK_SIZE to UINT
to allow 4GB - 1.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák e76d5c7bc5 mesa: change GL_MAX_COMPUTE_WORK_GROUP_COUNT to UINT
AMD wants to report UINT32_MAX here.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Marek Olšák c1381daab8 mesa: clamp UINT values greater than INT_MAX for glGetInteger
so that values greater than INT_MAX report INT_MAX with glGetInteger and
the full value with glGetInteger64. This allows exposing compute grid sizes
and max buffer sizes greater than INT_MAX.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07 00:17:57 -04:00
Mike Blumenkrantz 7acc91fe87 mesa/st: use util_streaming_load_memcpy for compute pbo copying
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
2022-06-07 03:33:20 +00:00