radv: Implement VK_AMD_shader_info

This allows an app to query shader statistics and get a disassembly of
a shader. RenderDoc git has support for it, so this allows you to view
shader disassembly from a capture.

When this extension is enabled on a device (or when tracing), we now
disable pipeline caching, since we don't get the shader debug info when
we retrieve cached shaders.

v2: Improvements to resource usage reporting
v3: Disassembly string must be null terminated (string_buffer's length
    does not include the terminator)
v4: Fixed LDS reporting. (Bas)

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Alex Smith
2017-10-27 14:25:05 +01:00
committed by Bas Nieuwenhuizen
parent 0a23841a98
commit de88979413
6 changed files with 172 additions and 36 deletions

View File

@@ -1942,7 +1942,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
free(codes[i]);
if (modules[i] && !pipeline->device->trace_bo)
if (modules[i] && !pipeline->device->keep_shader_info)
ralloc_free(nir[i]);
}