summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-03-19 15:09:31 +0000
committerMarge Bot <[email protected]>2020-04-03 12:12:08 +0000
commit7e6aec668772eb9cac014d78ba95272a063167fe (patch)
treee892ca261ea6df14efafebe2d0793fedd8b3baf7 /src/amd/vulkan/radv_shader.c
parent507956ed04fcdcfd44419d1b16f032e1d81d0dcb (diff)
radv, aco: collect statistics if requested but executables are not
Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2965> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2965>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 797c90159b8..a46691229f5 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -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