vo_gpu: vaapi: export plane pitch properly

This commit is contained in:
Niklas Haas 2021-02-12 23:31:03 +01:00
parent ce3fe08bd4
commit 968faef867
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper)
int fd = p->desc.objects[id].fd;
uint32_t size = p->desc.objects[id].size;
uint32_t offset = p->desc.layers[n].offset[0];
uint32_t pitch = p->desc.layers[n].pitch[0];
#if PL_API_VER >= 88
// AMD drivers do not return the size in the surface description, so we
@ -84,6 +85,9 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper)
.offset = offset,
#if PL_API_VER >= 88
.drm_format_mod = p->desc.objects[id].drm_format_modifier,
#endif
#if PL_API_VER >= 106
.stride_w = pitch,
#endif
},
};