radv, aco: collect statistics if requested but executables are not
[mesa.git] / src / amd / vulkan / radv_shader.c
index 797c90159b822d4701ee18f3aed56e61750eb894..a46691229f514b50e1838a8694f424bbf1a4f9c0 100644 (file)
@@ -1077,6 +1077,7 @@ shader_variant_compile(struct radv_device *device,
                       struct radv_nir_compiler_options *options,
                       bool gs_copy_shader,
                       bool keep_shader_info,
+                      bool keep_statistic_info,
                       struct radv_shader_binary **binary_out)
 {
        enum radeon_family chip_family = device->physical_device->rad_info.family;
@@ -1088,6 +1089,7 @@ shader_variant_compile(struct radv_device *device,
        options->dump_preoptir = options->dump_shader &&
                                 device->instance->debug_flags & RADV_DEBUG_PREOPTIR;
        options->record_ir = keep_shader_info;
+       options->record_stats = keep_statistic_info;
        options->check_ir = device->instance->debug_flags & RADV_DEBUG_CHECKIR;
        options->tess_offchip_block_dw_size = device->tess_offchip_block_dw_size;
        options->address32_hi = device->physical_device->rad_info.address32_hi;
@@ -1160,7 +1162,7 @@ radv_shader_variant_compile(struct radv_device *device,
                           struct radv_pipeline_layout *layout,
                           const struct radv_shader_variant_key *key,
                           struct radv_shader_info *info,
-                          bool keep_shader_info,
+                          bool keep_shader_info, bool keep_statistic_info,
                           struct radv_shader_binary **binary_out)
 {
        struct radv_nir_compiler_options options = {0};
@@ -1173,7 +1175,7 @@ radv_shader_variant_compile(struct radv_device *device,
        options.robust_buffer_access = device->robust_buffer_access;
 
        return shader_variant_compile(device, module, shaders, shader_count, shaders[shader_count - 1]->info.stage, info,
-                                    &options, false, keep_shader_info, binary_out);
+                                    &options, false, keep_shader_info, keep_statistic_info, binary_out);
 }
 
 struct radv_shader_variant *
@@ -1181,7 +1183,7 @@ radv_create_gs_copy_shader(struct radv_device *device,
                           struct nir_shader *shader,
                           struct radv_shader_info *info,
                           struct radv_shader_binary **binary_out,
-                          bool keep_shader_info,
+                          bool keep_shader_info, bool keep_statistic_info,
                           bool multiview)
 {
        struct radv_nir_compiler_options options = {0};
@@ -1190,7 +1192,7 @@ radv_create_gs_copy_shader(struct radv_device *device,
        options.key.has_multiview_view_index = multiview;
 
        return shader_variant_compile(device, NULL, &shader, 1, MESA_SHADER_VERTEX,
-                                     info, &options, true, keep_shader_info, binary_out);
+                                     info, &options, true, keep_shader_info, keep_statistic_info, binary_out);
 }
 
 void