Skip to content

WIP: freedreno: resource layout helper

Rob Clark requested to merge robclark/mesa:wip/layout-refactor into master

Rough idea is for this to eventually evolve into a helper shared by vk and gallium drivers, although I'm not sure the best way forward when it comes to dealing with not having access to PIPE_FORMAT_xyz and u_format helpers in src/freedreno. (And it is also a bit sad that vk_format_layout stuff is already duplicated twice)..

But the more immediate goal was to try and de-duplicate logic about which mipmap levels are tiled vs linear, and have ubwc enabled and that sort of thing. (Maybe there is room for something equiv to fdl_surface for texture and image views.. not sure yet, but at least simplifying the various different blit and gmem parts that have to care about a single 2d surface within a resource seems like a good start.

I converted a6xx gmem and blit paths to use the new helper to give an idea what it should look like to the user of the layout helper. Still need to convert the rest of the gens and dig out some old hw from closet to test because I might have broken stuff in the process. Just pushing as a WIP MR at this point to get feedback.

@krh and @bnieuwenhuizen you might have thoughts?

Merge request reports