res_templ.last_level = 0;
res_templ.depth0 = 1;
res_templ.array_size = 1;
- res_templ.width0 = memory_attribute->width;
- res_templ.height0 = memory_attribute->height;
res_templ.bind = PIPE_BIND_SAMPLER_VIEW;
res_templ.usage = PIPE_USAGE_DEFAULT;
whandle.type = WINSYS_HANDLE_TYPE_FD;
whandle.handle = memory_attribute->buffers[index];
whandle.modifier = DRM_FORMAT_MOD_INVALID;
+ whandle.format = templat->buffer_format;
// Create a resource for each plane.
memset(resources, 0, sizeof resources);
goto fail;
}
+ res_templ.width0 = util_format_get_plane_width(templat->buffer_format, i,
+ memory_attribute->width);
+ res_templ.height0 = util_format_get_plane_height(templat->buffer_format, i,
+ memory_attribute->height);
+
whandle.stride = memory_attribute->pitches[i];
whandle.offset = memory_attribute->offsets[i];
resources[i] = pscreen->resource_from_handle(pscreen, &res_templ, &whandle,