Samuel Pitoiset
e6735409ee
radv: disable DCC with signedness reinterpretation on GFX11
...
All formats should be compatible on GFX11 but for some weird reasons
DCC with signedness reinterpretation doesn't work as expected, like
R8_UINT<->R8_SINT. Note that RadeonSI also has issues with this.
This might be a hardware bug on RDNA3.
This fixes DCC issues with Cyberpunk and A Plague Tale: Requiem.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8371
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21755 >
2023-03-08 11:53:25 +00:00
Dave Airlie
24c09d4b16
radv: add video format support to format probing.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21457 >
2023-03-01 07:16:47 +00:00
Marek Olšák
98eee7dee3
amd: replace SI_BIG_ENDIAN with UTIL_ARCH_BIG_ENDIAN
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525 >
2023-02-24 21:27:24 +00:00
Konstantin Seurer
569517d7ad
radv: Use common ycbcr conversion lowering
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20731 >
2023-02-06 18:36:29 +00:00
Friedrich Vock
d816859ede
radv: Use internal allocation helpers for internal allocations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17331 >
2023-01-11 06:55:04 +00:00
Konstantin Seurer
ad8de42ce5
radv: Use get_first_non_void_channel more often
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634 >
2022-12-02 22:06:11 +00:00
Bas Nieuwenhuizen
6e020dff99
radv: Expose 3d sparse images.
...
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18165 >
2022-09-06 23:16:26 +00:00
Bas Nieuwenhuizen
c738c99a4a
radv: Add 3d tile shapes for sparse binding.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18165 >
2022-09-06 23:16:26 +00:00
Rhys Perry
e743e739a9
radv: enable 64-bit vertex formats
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Rhys Perry
813468c43c
radv: enable R8G8B8, B8G8R8 and R16G16B16 vertex formats
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Rhys Perry
97c1731f14
radv: remove radv_translate_vertex_format
...
This is not used anymore.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Rhys Perry
d4ec156d82
radv: add radv_is_vertex_buffer_format_supported
...
We will want to support formats which cannot used for texel buffers.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Rhys Perry
6a2ada93b4
ac: add ac_vtx_format_info
...
This will be used by RADV and ACO.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Rhys Perry
82f9e40851
radv: remove claimed support for sRGB vertex buffer formats
...
These probably don't work.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Benjamin Cheng
1c06565026
radv: expose disjoint image support
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16510 >
2022-07-26 19:50:58 +00:00
Konstantin Seurer
7e7e01fe0c
radv: Use desc->format
...
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490 >
2022-07-21 12:48:01 +00:00
Konstantin Seurer
ae67294479
radv: Remove format desc null checks
...
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490 >
2022-07-21 12:48:01 +00:00
Jason Ekstrand
c56f3dcbaa
radv: Use vk_image as the base for radv_image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16376 >
2022-05-17 18:14:55 +00:00
Bas Nieuwenhuizen
9c391fe47e
radv: Mark all formats as DCC compatible with each other on gfx11.
...
Reviewed-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/16419 >
2022-05-17 10:08:17 +00:00
Marek Olšák
39800f0fa3
amd: change chip_class naming to "enum amd_gfx_level gfx_level"
...
This aligns the naming with PAL.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pellou-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16469 >
2022-05-13 14:56:22 -04:00
Samuel Pitoiset
90db834603
radv: do not support UNIFORM_TEXEL_BUFFER with SRGB
...
Looks like it can't be supported. Also disabled by PRO/AMDVLK.
Fixes new CTS dEQP-VK.texture.texel_buffer.uniform.srgb.*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16010 >
2022-04-19 06:35:50 +00:00
Mike Blumenkrantz
6b65d4234c
radv: set read/write without format flags for supported texel buffers
...
if the storage case is supported, this should be supported too
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15826 >
2022-04-12 15:52:03 +00:00
Bas Nieuwenhuizen
51757d2249
radv: Add more BVH vertex formats.
...
AFAIU this is needed for DXR 1.1 with vkd3d-proton.
Reviewed-by: Samuel Pitoiset<samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15475 >
2022-04-01 21:00:20 +00:00
Samuel Pitoiset
2b18234e61
radv: drop EXT or KHR suffixes for stuff promoted in Vulkan 1.3
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15663 >
2022-03-31 07:13:17 +00:00
Boris Brezillon
eb1d009a3e
radv: Don't use VK_OUTARRAY_MAKE()/vk_outarray_append()
...
MSVC doesn't support typeof(). If we want to keep compiling radv on
windows we need to use the typed variants of those macros.
Fixes: 10d69d5f0b ("radv: fix returning empty drmFormatModifierTilingFeatures")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518 >
2022-03-24 09:11:13 +00:00
Samuel Pitoiset
10d69d5f0b
radv: fix returning empty drmFormatModifierTilingFeatures
...
From the Vulkan spec:
"drmFormatModifierTilingFeatures is a bitmask of
VkFormatFeatureFlagBits that are supported by any image created
with format and drmFormatModifier. The returned
drmFormatModifierTilingFeatures must contain at least one bit."
This fixes recent CTS dEQP-VK.drm_format_modifiers.*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15383 >
2022-03-15 19:43:48 +00:00
Samuel Pitoiset
0eaf9dbce3
radv: fix compatibility with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
...
Some formats can be accepted if a compatible format is also supported
and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT used.
Fixes new CTS dEQP-VK.image.extended_usage_bit_compatibility.*.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6046
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15063 >
2022-03-14 11:16:33 +00:00
Bas Nieuwenhuizen
7c5fe66f8a
radv: Set up ETC2 emulation wiring.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14071 >
2021-12-14 11:30:48 +00:00
Bas Nieuwenhuizen
68b7b4fb38
radv: Don't crash if VkExternalImageFormatProperties isn't provided.
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5623
Stable: 21.2 21.3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13786 >
2021-11-16 10:23:37 +00:00
James Park
0aaaee09a4
radv: Match function definitions to declarations
...
Fixes compiler errors for 32-bit Windows.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13749 >
2021-11-12 09:46:10 +00:00
Samuel Pitoiset
ca7c748f45
radv: do not expose buffer features for depth/stencil formats
...
The Vulkan spec got clarified recently and it's invalid (hw can support
it though). Fixes new CTS dEQP-VK.api.buffer.invalid_buffer_features.*.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13701 >
2021-11-09 09:13:38 +00:00
Bas Nieuwenhuizen
b4aa5a3fdd
radv: Fix modifier property query.
...
radv_get_modifier_flags read the format properties, doesn't write any. Setting
the central format properties based on the drm format properties doesn't make
any sense.
Fixes: 5dee0d9da9 "radv: switch to VK_FORMAT_FEATURE_2_XXX/VkFormatProperties3KHR"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5498
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13357 >
2021-10-14 13:29:42 +00:00
Rhys Perry
d1f09419b4
radv: add radv_translate_vertex_format()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11717 >
2021-10-13 05:13:10 +00:00
Samuel Pitoiset
49c3a88fad
radv: implement VK_KHR_format_feature_flags2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13194 >
2021-10-12 10:20:47 +00:00
Samuel Pitoiset
5dee0d9da9
radv: switch to VK_FORMAT_FEATURE_2_XXX/VkFormatProperties3KHR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13194 >
2021-10-12 10:20:47 +00:00
Joshua Ashton
f63ec0128c
radv: Respect max extent for modifiers
...
Some of our modifiers only support upto a certain range, expose this in ImageFormatProperties.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13056 >
2021-10-11 11:43:39 +00:00
Samuel Pitoiset
19f7a3f01f
radv: implement vkGetDeviceImageSparseMemoryRequirementsKHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13193 >
2021-10-11 08:25:46 +00:00
Jason Ekstrand
7a2516568d
radv: Switch to the new common vk_error helpers
...
Also, change every vk_error to use the closest object instead of
fetching all the way back to the instance.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045 >
2021-10-07 20:51:36 +00:00
Bas Nieuwenhuizen
954602b1f8
radv: Add VK_FORMAT_R16G16B16A16_UNORM for accel. structures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13240 >
2021-10-07 08:57:26 +00:00
Bas Nieuwenhuizen
848d175c76
radv: Add more acceleration structure formats.
...
These are required ...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592 >
2021-09-21 01:53:39 +00:00
Joshua Ashton
592aa9375c
radv: Expose modifiers that support DCC image stores with STORAGE_IMAGE_BIT
...
Some games, ie. Doom Eternal, present from compute following compute post-fx and would benefit from having DCC image stores available.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862 >
2021-09-18 00:01:01 +00:00
Samuel Pitoiset
9fc16b66d0
radv: use common vkGetPhysicalDevice{Image}FormatProperties()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
8a9c17bf4e
radv: use common entrypoints for sparse image requirements/properties
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12416 >
2021-09-02 10:56:39 +00:00
Samuel Pitoiset
0f05c84bba
radv: allow storage images with VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 on GFX10.3+
...
It should be supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12543 >
2021-08-25 16:27:46 +00:00
Rhys Perry
c14a85e756
radv: enable DCC with signedness reinterpretation
...
It seems we can enable DCC if the possible formats differ in signedness
and are otherwise compatible. We just need a fast-clear eliminate for
certain clear colors.
Improves Trine 4 performance.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9387 >
2021-08-12 17:14:00 +01:00
Rhys Perry
1e508777b4
radv: allow VK_FORMAT_R8G8_SRGB sampling
...
No reason why we can't do this. AMDVLK also allows this.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11317 >
2021-06-21 18:17:09 +00:00
Bas Nieuwenhuizen
438cb7f9a3
radv: Expose formats for acceleration structure.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11078 >
2021-06-18 22:16:27 +00:00
Georg Lehmann
36d0ff4682
radv: Fix compatible image handle type for dmabufs.
...
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 6c83e3ea98 ("radv: Add format modifier format queries.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10891 >
2021-05-20 15:11:07 +00:00
Simon Ser
0e94675494
radv: stop special-casing multi-planar formats in radv_get_modifier_flags
...
In radv_get_modifier_flags, we had a special case for multi-planar
formats. However ac_is_modifier_supported should already take care of
rejecting unsupported modifiers for multi-planar buffers.
Some time ago, ac_is_modifier_supported rejected any non-linear modifier
for multi-planar formats. 35e25ea1d0 ("ac/surface: allow non-DCC modifiers
for YUV on GFX9+") changed that to allow non-DCC modifiers with
multi-planar formats on GFX9+. Since then, the radv check has been out
of sync.
A similar patch was applied to radeonsi in 979e138695 ("radeonsi: stop
special-casing YUV formats in si_query_dmabuf_modifiers").
This fixes tiling artifacts with NV12 buffers.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623 >
2021-05-10 14:31:21 +00:00
Rhys Perry
816ec3ecb4
radv: disable VK_FORMAT_R64_SFLOAT
...
This format was enabled by accident, isn't useful, and doesn't work.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4701
Cc: 21.1 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10450 >
2021-04-26 12:10:13 +01:00