KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

Add new YCbCr formats and CmdCopyImage checks #2531

Closed daveh-lunarg closed 6 years ago

daveh-lunarg commented 6 years ago

The VK_KHR_sampler_ycbcr_conversion extension added new formats, which then became core with Vulkan 1.1. This PR adds support for the new single- and multi-plane formats within the layer format utility fxns, and adds checks for VUIDs added or modified within CmdCopyImage. Includes tests for new VUIDs, and adds guards to existing tests for modified VUIDs.

This is the first chunk of what will be several PRs related to this extension, dealing with ~20 of the 128 VUIDs added or modified.

tobine commented 6 years ago

Couple of test fails

[ RUN ] VkLayerTest.CopyImageSinglePlane422Alignment /home/travis/build/KhronosGroup/Vulkan-LoaderAndValidationLayers/tests/vkrenderframework.cpp:968: Failure Failed VkImageObj::init() error: unsupported tiling configuration. Usage: 0x3, supported optimal features: 0 /home/travis/build/KhronosGroup/Vulkan-LoaderAndValidationLayers/tests/layer_validation_tests.cpp:20328: Failure Value of: image_422.initialized() Actual: false Expected: true [ FAILED ] VkLayerTest.CopyImageSinglePlane422Alignment (31 ms) [ RUN ] VkLayerTest.CopyImageMultiplaneAspectBits /home/travis/build/KhronosGroup/Vulkan-LoaderAndValidationLayers/tests/vkrenderframework.cpp:968: Failure Failed VkImageObj::init() error: unsupported tiling configuration. Usage: 0x3, supported optimal features: 0 /home/travis/build/KhronosGroup/Vulkan-LoaderAndValidationLayers/tests/layer_validation_tests.cpp:20455: Failure Value of: mp3_image.initialized() Actual: false Expected: true [ FAILED ] VkLayerTest.CopyImageMultiplaneAspectBits (31 ms)

daveh-lunarg commented 6 years ago

There's some guesswork involved, but I think Travis (mock) is providing conflicting answers about whether a format is supported, depending on how you ask. i.e. vkGetPhysicalDeviceFormatProperties() provides no feature bits, although vkGetPhysicalDeviceImageFormatProperties() returns VK_SUCCESS.

I've updated the tests to use a more comprehensive format check anyway, actually a good incentive to consolidate what had become a handful of one-offs.