Conversation
Revert the SAMPLED_BIT stripping from combined multi-planar image views introduced in commit 7f90998 ("Fix VE: Exclude SAMPLED_BIT from multi-planar combined views without YCbCr"). The original fix went too far: it stripped VK_IMAGE_USAGE_SAMPLED_BIT from combined views of multi-planar YCbCr images. But the decoder's display pipeline uses the combined view WITH a VkSamplerYcbcrConversion object for sampling decoded frames during rendering. Without SAMPLED_BIT, the view cannot be sampled and the display shows a blank/black screen. The correct behavior: - STORAGE_BIT: Strip from combined views (multi-planar formats don't support storage operations -- only per-plane R8/RG8 views do) - SAMPLED_BIT: Keep on combined views. The decoder's display path creates a VkSamplerYcbcrConversion for multi-planar sampling, satisfying VUID-VkImageViewCreateInfo-format-06415. The encoder path that doesn't use YCbCr conversion skips the combined view entirely (skipCombinedView) Bisected-from: 7f90998 Ref: https://gitlab.khronos.org/vulkan/vulkan/-/issues/4624 Signed-off-by: Tony Zlatinski <tzlatinski@nvidia.com>
When vkGetPhysicalDeviceVideoCapabilitiesKHR fails for the reported H.264 profile, automatically retry with higher profiles (Baseline → Main → High). This handles streams mis-tagged as Baseline that use features requiring Main or High (e.g., interlaced content, CABAC, B-slices, weighted prediction). H.264 Baseline profile doesn't support interlaced video, but some encoders/muxers incorrectly tag interlaced streams as Baseline. The driver correctly rejects Baseline for such content with VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR. Upgrading to Main (or High) resolves this since they are strict supersets. This matches NVCUVID/CUVID behavior which always uses the highest compatible profile. The upgrade path tries Main first, then High. A warning is printed when an upgrade occurs so users can identify mis-tagged streams. Fixes: Assert failure on 1080i-25-H264.mkv (interlaced Baseline) Signed-off-by: Tony Zlatinski <tzlatinski@nvidia.com>
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.
Fix a regression from the previews validation layer fixes that renders the display frames blank
Has a profile fallback for malformed bitstreams.