turnip: Add TU_DEBUG=layout for dumping image layouts.
This was useful for comparing image allocations between gfxbench gl_5_normal and vk_5_normal to see if rendering was generally equivalent (formats, MSAA, UBWC choices, and notably gfxbench vk was choosing DXT5 instead of ASTC on non-android builds!) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
This commit is contained in:
parent
2c683519e2
commit
ce15bf19fb
|
@ -330,6 +330,7 @@ static const struct debug_control tu_debug_options[] = {
|
|||
{ "sysmem", TU_DEBUG_SYSMEM },
|
||||
{ "gmem", TU_DEBUG_GMEM },
|
||||
{ "forcebin", TU_DEBUG_FORCEBIN },
|
||||
{ "layout", TU_DEBUG_LAYOUT },
|
||||
{ "noubwc", TU_DEBUG_NOUBWC },
|
||||
{ "nomultipos", TU_DEBUG_NOMULTIPOS },
|
||||
{ "nolrz", TU_DEBUG_NOLRZ },
|
||||
|
|
|
@ -506,6 +506,9 @@ tu_image_init(struct tu_device *device, struct tu_image *image,
|
|||
return vk_error(device, VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT);
|
||||
}
|
||||
|
||||
if (device->instance->debug_flags & TU_DEBUG_LAYOUT)
|
||||
fdl_dump_layout(layout);
|
||||
|
||||
/* fdl6_layout can't take explicit offset without explicit pitch
|
||||
* add offset manually for extra layouts for planes
|
||||
*/
|
||||
|
|
|
@ -268,6 +268,7 @@ enum tu_debug_flags
|
|||
TU_DEBUG_GMEM = 1 << 13,
|
||||
TU_DEBUG_RAST_ORDER = 1 << 14,
|
||||
TU_DEBUG_UNALIGNED_STORE = 1 << 15,
|
||||
TU_DEBUG_LAYOUT = 1 << 16,
|
||||
};
|
||||
|
||||
struct tu_instance
|
||||
|
|
Loading…
Reference in New Issue