diff mbox series

[FFmpeg-devel,V2,02/10] libavutil/hwcontext_vulkan: fix a tile mismatch problem

Message ID 20210831072430.303090-2-wenbin.chen@intel.com
State New
Headers show
Series [FFmpeg-devel,V2,01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1 | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wenbin Chen Aug. 31, 2021, 7:24 a.m. UTC
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.chen@intel.com>
 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


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 :