radv: set keep_statistic_info with RADV_DEBUG=shaderstats
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 5 Jun 2020 13:28:28 +0000 (14:28 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 5 Jun 2020 15:11:01 +0000 (15:11 +0000)
Needed for RADV_DEBUG=shaderstats to dump ACO statistics.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5358>

src/amd/vulkan/radv_pipeline.c

index c51726f2bed3a2b7e04d4c4339bc2e9c7179af85..6d8e7f9555ff80fb92f8f05a6d57068a63a4260e 100644 (file)
@@ -2831,7 +2831,9 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
        struct radv_shader_info infos[MESA_SHADER_STAGES] = {0};
        unsigned char hash[20], gs_copy_hash[20];
        bool keep_executable_info = (flags & VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR) || device->keep_shader_info;
-       bool keep_statistic_info = (flags & VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR) || device->keep_shader_info;
+       bool keep_statistic_info = (flags & VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR) ||
+                                  (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADER_STATS) ||
+                                  device->keep_shader_info;
 
        radv_start_feedback(pipeline_feedback);