mesamatrix icon indicating copy to clipboard operation
mesamatrix copied to clipboard

Unsupported Vulkan 1.x required extensions showing up as supported due to bad assumption

Open TheW0LVERIN3 opened this issue 9 months ago • 6 comments

Why does VK_EXT_pipeline_protected_access report GFX8+ on radv when VK_EXT_pipeline_protected_access doesn't even list radv on the features.txt. Is VK_EXT_pipeline_protected_access supported on radv? If yes, is it GFX8+? If yes, where is that being fetched/displayed from? I can only suspect that it has something to do with vulkan 1.4 on features.txt saying radv gfx8+ but I don't even know whether that has anything to do with that vulkan extension that doesn't have radv listed.

TheW0LVERIN3 avatar Jul 21 '25 15:07 TheW0LVERIN3

In support of that last remark, turnip also doesn't list any minimum level for any vulkan 1.4 extension individually and is listed in all of them except VK_EXT_pipeline_protected_access in features.txt but has a700+ listed at the top next to the vulkan 1.4 title. And suspiciously also only has a700+ as a thing for VK_EXT_pipeline_protected_access on mesamatrix. panvk seems to have this issue as well, aka all three that list a min hw next to the vulkan 1.4 title in features.txt have it appear in VK_EXT_pipeline_protected_access in mesamatrix even though the drivers aren't listed next to VK_EXT_pipeline_protected_access in features.txt So, the first question is what the hw requirements next to the vulkan 1.4 title in features.txt are relevant for, if they aren't outdated. The second question is which drivers actually support VK_EXT_pipeline_protected_access and for which min hw?

TheW0LVERIN3 avatar Jul 21 '25 16:07 TheW0LVERIN3

I think I'm starting to get an idea. If a driver isn't listed in features.txt for a vulkan 1.x required extension but it is listed in the vulkan 1.x all done list, then the fact that that extension is supported and the min hw is assumed from what's written on the vulkan 1.x all done list. This fallback is necessary I guess, though honestly it really shouldn't be.

TheW0LVERIN3 avatar Jul 21 '25 16:07 TheW0LVERIN3

This fallback's assumption also doesn't seem true. Like with VK_EXT_ycbcr_2plane_444_formats for example: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9486

It's likely the fallback's assumption's are untrue entirely, it'd be best to have someone verify this/check this out. Or file an issue with the required extensions not marked as supported on features.txt for each driver and ask the devs which ones are and aren't supported.

TheW0LVERIN3 avatar Jul 21 '25 16:07 TheW0LVERIN3

VK_EXT_pipeline_protected_access indeed seems to be completely unsupported on radv: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vulkan/radv_physical_device.c#L962 This is further evidence the assumption is incorrect

TheW0LVERIN3 avatar Jul 21 '25 16:07 TheW0LVERIN3

This fallback's assumption also doesn't seem true. Like with VK_EXT_ycbcr_2plane_444_formats for example: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9486

It's likely the fallback's assumption's are untrue entirely, it'd be best to have someone verify this/check this out. Or file an issue with the required extensions not marked as supported on features.txt for each driver and ask the devs which ones are and aren't supported.

VK_EXT_ycbcr_2plane_444_formats has only now been implemented for radv, yet Mesamatrix had it incorrectly checked off for a long time now.

On the other hand, features.txt clearly states:

Here's how to read this file:
all DONE: <driver>, ...
    All the extensions are done for the given list of drivers.
DONE
    The extension is done for Mesa and no implementation is necessary on the
    driver-side.
DONE ()
    The extension is done for Mesa and all the drivers in the "all DONE" list.
DONE (<driver>, ...)
    The extension is done for Mesa, all the drivers in the "all DONE" list, and
    all the drivers in the brackets.
[...]

…and the all DONE lists are definitely used for this purpose, at least in some cases.

So what's up with VK_EXT_ycbcr_2plane_444_formats? Why doesn't Vulkan 1.3 -- all DONE: radv apply to that? That issue linked earlier gives this explanation:

Support is optional in 1.3 -- but not in the EXT. It was only partially promoted.

mskiptr avatar Sep 08 '25 18:09 mskiptr

Frankly, it seems like different Mesa developers mean different things by those DONE and all DONE statements. It might also be the case that features.txt does not provide enough information about whether extensions are optional, mandatory or something in-between.

mskiptr avatar Sep 08 '25 18:09 mskiptr