From: Tony Zlatinski Date: Thu, 16 Aug 2018 13:17:28 +0000 (-0500) Subject: Vulkan AHB - fix incorrect structure definition X-Git-Tag: upstream/1.3.5~1974^2~8^2~5^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=181b5cd80eb5696484a7ba20fe94b22133367de9;p=platform%2Fupstream%2FVK-GL-CTS.git Vulkan AHB - fix incorrect structure definition Fix a missing VkComponentMapping field of the VkAndroidHardwareBufferFormatPropertiesANDROID structure. This is causing incorrect values to be populated to the structure, as well as, a stack overwrite of other stack-located locals. Affects: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.r8g8b8a8_unorm dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.r5g6b5_unorm_pack16 dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.r16g16b16a16_sfloat dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.a2b10g10r10_unorm_pack32 Components: Vulkan VK-GL-CTS issue: 1305 VK-GL-CTS issue: 1316 Bug: b/112705952 Change-Id: I81eb1cc605912bf0adebe67b65d7ccdd31236ec9 (cherry picked from Khronos commit 0116a17ddb4eb4f25624698bc0ba1c68e51a6950) --- diff --git a/external/vulkancts/framework/vulkan/vkStrUtilImpl.inl b/external/vulkancts/framework/vulkan/vkStrUtilImpl.inl index c4e3ba1..8b46485 100644 --- a/external/vulkancts/framework/vulkan/vkStrUtilImpl.inl +++ b/external/vulkancts/framework/vulkan/vkStrUtilImpl.inl @@ -5976,6 +5976,7 @@ std::ostream& operator<< (std::ostream& s, const VkAndroidHardwareBufferFormatPr s << "\tformat = " << value.format << '\n'; s << "\texternalFormat = " << value.externalFormat << '\n'; s << "\tformatFeatures = " << getFormatFeatureFlagsStr(value.formatFeatures) << '\n'; + s << "\tsamplerYcbcrConversionComponents = " << value.samplerYcbcrConversionComponents << '\n'; s << "\tsuggestedYcbcrModel = " << value.suggestedYcbcrModel << '\n'; s << "\tsuggestedYcbcrRange = " << value.suggestedYcbcrRange << '\n'; s << "\tsuggestedXChromaOffset = " << value.suggestedXChromaOffset << '\n'; diff --git a/external/vulkancts/framework/vulkan/vkStructTypes.inl b/external/vulkancts/framework/vulkan/vkStructTypes.inl index 3dc2aaa..b307ea3 100644 --- a/external/vulkancts/framework/vulkan/vkStructTypes.inl +++ b/external/vulkancts/framework/vulkan/vkStructTypes.inl @@ -2797,6 +2797,7 @@ struct VkAndroidHardwareBufferFormatPropertiesANDROID VkFormat format; deUint64 externalFormat; VkFormatFeatureFlags formatFeatures; + VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; diff --git a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp index 6186423..d4a75e0 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp @@ -3814,6 +3814,7 @@ bool ValidateAHardwareBuffer(vk::VkFormat format, deUint64 requiredAhbUsage, con vk::VK_FORMAT_UNDEFINED, 0u, 0u, + { vk::VK_COMPONENT_SWIZZLE_IDENTITY, vk::VK_COMPONENT_SWIZZLE_IDENTITY, vk::VK_COMPONENT_SWIZZLE_IDENTITY, vk::VK_COMPONENT_SWIZZLE_IDENTITY }, vk::VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, vk::VK_SAMPLER_YCBCR_RANGE_ITU_FULL, vk::VK_CHROMA_LOCATION_COSITED_EVEN, diff --git a/external/vulkancts/scripts/src/vulkan.h.in b/external/vulkancts/scripts/src/vulkan.h.in index 92e48a5..00cc5a8 100644 --- a/external/vulkancts/scripts/src/vulkan.h.in +++ b/external/vulkancts/scripts/src/vulkan.h.in @@ -7446,6 +7446,7 @@ typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { VkFormat format; uint64_t externalFormat; VkFormatFeatureFlags formatFeatures; + VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset;