mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
radv: Properly initialize imageCreateFlags in GetPhysicalDeviceVideoFormatPropertiesKHR
Signed-off-by: Joshua Ashton <joshua@froggi.es> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28841>
This commit is contained in:
parent
ba32ea6da3
commit
122455b686
1 changed files with 14 additions and 4 deletions
|
|
@ -781,11 +781,16 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
p->format = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16;
|
||||
p->componentMapping.r = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.g = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.b = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.a = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->imageCreateFlags = 0;
|
||||
if (pVideoFormatInfo->imageUsage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)
|
||||
p->imageCreateFlags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
||||
p->imageType = VK_IMAGE_TYPE_2D;
|
||||
p->imageTiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
p->imageUsageFlags = pVideoFormatInfo->imageUsage;
|
||||
if (pVideoFormatInfo->imageUsage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)
|
||||
p->imageCreateFlags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
||||
}
|
||||
|
||||
if (pVideoFormatInfo->imageUsage & (VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR))
|
||||
|
|
@ -796,11 +801,16 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
p->format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
|
||||
p->componentMapping.r = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.g = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.b = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->componentMapping.a = VK_COMPONENT_SWIZZLE_IDENTITY;
|
||||
p->imageCreateFlags = 0;
|
||||
if (pVideoFormatInfo->imageUsage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)
|
||||
p->imageCreateFlags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
||||
p->imageType = VK_IMAGE_TYPE_2D;
|
||||
p->imageTiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
p->imageUsageFlags = pVideoFormatInfo->imageUsage;
|
||||
if (pVideoFormatInfo->imageUsage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)
|
||||
p->imageCreateFlags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue