mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
radv/video: Don't allow DRM format modifier tiling on GFX < 9
Fixes: 566ea76d8e ("radv/video: Support DRM format modifier tiling")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36288>
This commit is contained in:
parent
b781ae57a5
commit
ad11e826b7
1 changed files with 7 additions and 6 deletions
|
|
@ -1111,6 +1111,10 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
}
|
||||
}
|
||||
|
||||
const bool drm_format_modifier_tiling =
|
||||
pdev->info.gfx_level >= GFX9 && pVideoFormatInfo->imageUsage & (VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR |
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR);
|
||||
|
||||
if (need_12bit) {
|
||||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
|
|
@ -1128,8 +1132,7 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
p->imageUsageFlags = pVideoFormatInfo->imageUsage;
|
||||
}
|
||||
|
||||
if (pVideoFormatInfo->imageUsage &
|
||||
(VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR | VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)) {
|
||||
if (drm_format_modifier_tiling) {
|
||||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
p->format = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16;
|
||||
|
|
@ -1167,8 +1170,7 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
p->imageUsageFlags = pVideoFormatInfo->imageUsage;
|
||||
}
|
||||
|
||||
if (pVideoFormatInfo->imageUsage &
|
||||
(VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR | VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)) {
|
||||
if (drm_format_modifier_tiling) {
|
||||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
p->format = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16;
|
||||
|
|
@ -1204,8 +1206,7 @@ radv_GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice,
|
|||
p->imageUsageFlags = pVideoFormatInfo->imageUsage;
|
||||
}
|
||||
|
||||
if (pVideoFormatInfo->imageUsage &
|
||||
(VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR | VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR)) {
|
||||
if (drm_format_modifier_tiling) {
|
||||
vk_outarray_append_typed(VkVideoFormatPropertiesKHR, &out, p)
|
||||
{
|
||||
p->format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue