vaallocator: fix assumption object size equal fd size

Remove the comment and warning message that object size should be equal to the
file descriptor size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5264>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-08-30 13:01:04 +02:00 committed by GStreamer Marge Bot
parent 169e38cbe6
commit 2d358cb22a

View file

@ -704,14 +704,14 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator,
for (i = 0; i < desc.num_objects; i++) {
gint fd = desc.objects[i].fd;
/* don't rely on prime descriptor reported size since gallium drivers report
* different values */
/* prime descriptor reports the total size of the object, including regions
* which aren't part surface's space. Let's just grab the surface's size: */
gsize size = _get_fd_size (fd);
GstMemory *mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
if (size != desc.objects[i].size) {
if (desc.objects[i].size < size) {
GST_WARNING_OBJECT (self, "driver bug: fd size (%" G_GSIZE_FORMAT
") differs from object descriptor size (%" G_GUINT32_FORMAT ")",
") is bigger than object descriptor size (%" G_GUINT32_FORMAT ")",
size, desc.objects[i].size);
}