From: "Chen,Wenbin" <wenbin.c...@intel.com>

We should configure VkImageSubresource according to tiling rather than
extension. We use extension to set tiling only when we map from drm.
Normally the output VkImages are not created in this way, and it will
report error when we map these VkImage to drm, so we should configure
VkImageSubresource according to tiling rather than
extension. Now fix it.

Signed-off-by: Wenbin Chen <wenbin.c...@intel.com>
---
 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 94fdad7f06..88db5b8b70 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2888,7 +2888,7 @@ static int vulkan_map_to_drm(AVHWFramesContext *hwfc, 
AVFrame *dst,
     for (int i = 0; i < drm_desc->nb_layers; i++) {
         VkSubresourceLayout layout;
         VkImageSubresource sub = {
-            .aspectMask = p->extensions & EXT_DRM_MODIFIER_FLAGS ?
+            .aspectMask = f->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT 
?
                           VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT :
                           VK_IMAGE_ASPECT_COLOR_BIT,
         };
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to