freedreno: Refactor fd_resource_create_with_modifiers() into a helper

The helper just allocates and resolves layout, but does not deal with
scanout buffers nor allocation of the actual bo.

The resolved bo size is returned as an output argument.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
1 file changed