Conversation
Debian stable is on 1.4.309, and Ubuntu LTS is brand new this year, so we have an opportunity to bump our minimum headers up. This lets us drop the #ifdef checks that guard the extension entries and feature structs for extensions older than that release, and reference VK_KHR_video_decode_av1 through its define rather than as a string literal.
Our general principle is that if libplacebo requests a Vulkan extension or feature that we want, we don't redundantly request it ourselves. Both mpv and libplacebo have resynced their extension lists based on what ffmpeg wants, and in the process, `shaderZeroInitializeWorkgroupMemory` ended up in both lists. So we should remove it from mpv. In the process of doing this audit, I noted that the video maintenance extensions we request are also in libplacebo, but not in our minimum version (7.360.1), so we should keep the explicit requests for now.
Bring the extensions and features we request in line with what the libavutil Vulkan hwcontext enables, so FFmpeg can make full use of the device we give it. New extensions, along with their matching features: * VK_KHR_workgroup_memory_explicit_layout * VK_KHR_shader_maximal_reconvergence (1.3.276) * VK_EXT_shader_replicated_composites (1.3.286) * VK_EXT_zero_initialize_device_memory (1.4.315) * VK_KHR_unified_image_layouts (1.4.317) * VK_EXT_shader_long_vector (1.4.337) * VK_KHR_maintenance11 (1.4.350) The core 1.0-1.3 features now match lavu's device_features_copy_needed(), minus the ones libplacebo already requests. Dynamic rendering is now requested through VkPhysicalDeviceVulkan13Features, which libplacebo maps back onto the extension structs for older devices. Not mirrored from lavu: * Video encode extensions, as we only decode. * VK_KHR_internally_synchronized_queues. libplacebo creates the queues, and newer versions enable it on their own. Enabling the feature with a libplacebo that doesn't create its queues with the flag would make lavu request queues with a flag they were never created with. * VK_EXT_physical_device_drm, which lavu only uses when creating its own device.
FFmpeg doesn't use it anymore, since Mesa doesn't cache shader objects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This set of changes brings our requested Vulkan extensions and features back in sync with both ffmpeg and libplacebo, while bumping our required Vulkan headers up, allowing for the removal of a bunch of conditional #ifdeferry.
My commits do the header version bump and remove an unnecessary extension request, with @cyanreg's changes from #18521 layered on top. Note that we are continuing the mpv practice of not redundantly including extensions and features that libplacebo already enables.
Maybe we'd prefer not to remove the shader object extension to avoid functional degradation with older ffmpeg releases; if so we can just not merge that commit.
This supersedes #18521.