Module: Mesa Branch: main Commit: c1050b53303b7f07703d5549f04286ae386e84fc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1050b53303b7f07703d5549f04286ae386e84fc
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Fri Mar 24 10:18:17 2023 +0100 radv: add RADV_DEBUG=extra_md This enables the use of UMD metadata v2. This allows tools (eg umr) import buffers. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984> --- docs/envvars.rst | 2 ++ src/amd/vulkan/radv_debug.h | 1 + src/amd/vulkan/radv_image.c | 2 +- src/amd/vulkan/radv_instance.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index de973e6ff3b..105da9f7b89 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1063,6 +1063,8 @@ RADV driver environment variables validate the LLVM IR before LLVM compiles the shader ``epilogs`` dump fragment shader epilogs + ``extra_md`` + add extra information in bo metadatas to help tools (umr) ``forcecompress`` Enables DCC,FMASK,CMASK,HTILE in situations where the driver supports it but normally does not deem it beneficial. diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 07d3033adbe..74a373b22ea 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -68,6 +68,7 @@ enum { RADV_DEBUG_DUMP_EPILOGS = 1ull << 37, RADV_DEBUG_NO_FMASK = 1ull << 38, RADV_DEBUG_SHADOW_REGS = 1ull << 39, + RADV_DEBUG_EXTRA_MD = 1ull << 40, }; enum { diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 734d8e44235..a499dd0fe80 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1443,7 +1443,7 @@ radv_query_opaque_metadata(struct radv_device *device, struct radv_image *image, ac_surface_compute_umd_metadata(&device->physical_device->rad_info, &image->planes[0].surface, image->info.levels, desc, &md->size_metadata, md->metadata, - false); + device->instance->debug_flags & RADV_DEBUG_EXTRA_MD); } void diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c index 14aa0c983ca..032e0315314 100644 --- a/src/amd/vulkan/radv_instance.c +++ b/src/amd/vulkan/radv_instance.c @@ -74,6 +74,7 @@ static const struct debug_control radv_debug_options[] = { {"epilogs", RADV_DEBUG_DUMP_EPILOGS}, {"nofmask", RADV_DEBUG_NO_FMASK}, {"shadowregs", RADV_DEBUG_SHADOW_REGS}, + {"extra_md", RADV_DEBUG_EXTRA_MD}, {NULL, 0}}; const char *
