radv: add radv_dump_pipeline_state() helper
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 24 May 2018 11:09:13 +0000 (13:09 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 25 May 2018 09:58:05 +0000 (11:58 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_debug.c

index 5cdbf5bea9a5a3bf096b54563aaeea9ff30478f8..c84e3be25bb7beb53380edce35e3de0b2cc826b6 100644 (file)
@@ -525,6 +525,15 @@ radv_dump_shaders(struct radv_pipeline *pipeline,
        }
 }
 
+static void
+radv_dump_pipeline_state(struct radv_pipeline *pipeline,
+                        VkShaderStageFlagBits active_stages, FILE *f)
+{
+       radv_dump_shaders(pipeline, active_stages, f);
+       radv_dump_annotated_shaders(pipeline, active_stages, f);
+       radv_dump_descriptors(pipeline, f);
+}
+
 static void
 radv_dump_graphics_state(struct radv_pipeline *graphics_pipeline,
                         struct radv_pipeline *compute_pipeline, FILE *f)
@@ -536,9 +545,7 @@ radv_dump_graphics_state(struct radv_pipeline *graphics_pipeline,
 
        active_stages = graphics_pipeline->active_stages;
 
-       radv_dump_shaders(graphics_pipeline, active_stages, f);
-       radv_dump_annotated_shaders(graphics_pipeline, active_stages, f);
-       radv_dump_descriptors(graphics_pipeline, f);
+       radv_dump_pipeline_state(graphics_pipeline, active_stages, f);
 }
 
 static void
@@ -549,9 +556,7 @@ radv_dump_compute_state(struct radv_pipeline *compute_pipeline, FILE *f)
        if (!compute_pipeline)
                return;
 
-       radv_dump_shaders(compute_pipeline, active_stages, f);
-       radv_dump_annotated_shaders(compute_pipeline, active_stages, f);
-       radv_dump_descriptors(compute_pipeline, f);
+       radv_dump_pipeline_state(compute_pipeline, active_stages, f);
 }
 
 static struct radv_pipeline *