Mesa (master): radv: set keep_statistic_info with RADV_DEBUG=shaderstats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 5 15:27:32 UTC 2020


Module: Mesa
Branch: master
Commit: 5d13c7477eb163c3d33aa7729e6bf0336d69156f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d13c7477eb163c3d33aa7729e6bf0336d69156f

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Fri Jun  5 14:28:28 2020 +0100

radv: set keep_statistic_info with RADV_DEBUG=shaderstats

Needed for RADV_DEBUG=shaderstats to dump ACO statistics.

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

---

 src/amd/vulkan/radv_pipeline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index c51726f2bed..6d8e7f9555f 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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);
 



More information about the mesa-commit mailing list