glupload: dmabuf: Fix emulated tiled import

The added check for LINEAR modifier broke dmabuf import for
NV12 emulation (R8/RG88) of all sort (linear and tiled).

Fixes !5461

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7907>
This commit is contained in:
Nicolas Dufresne 2024-11-14 15:13:50 -05:00 committed by Backport Bot
parent 65d18bca7d
commit 0e672340e5

View file

@ -1503,7 +1503,8 @@ _dma_buf_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
return FALSE;
}
if (!dmabuf->direct && in_info_drm->drm_modifier != DRM_FORMAT_MOD_LINEAR) {
if (!dmabuf->direct && in_info_drm->drm_modifier != DRM_FORMAT_MOD_LINEAR
&& in_info_drm->drm_modifier != DRM_FORMAT_MOD_INVALID) {
GST_DEBUG_OBJECT (dmabuf->upload,
"Indirect uploads are only support for linear formats.");
return FALSE;