cs_shader = radv_shader_create(device, cache, *cs_binary, keep_executable_info || dump_shader);
- radv_shader_generate_debug_info(device, dump_shader, *cs_binary, cs_shader, &cs_stage->nir, 1, &cs_stage->info);
+ radv_shader_generate_debug_info(device, dump_shader, keep_executable_info, *cs_binary, cs_shader, &cs_stage->nir, 1,
+ &cs_stage->info);
if (keep_executable_info && cs_stage->spirv.size) {
cs_shader->spirv = malloc(cs_stage->spirv.size);
struct radv_shader *copy_shader =
radv_shader_create(device, cache, *gs_copy_binary, keep_executable_info || dump_shader);
if (copy_shader)
- radv_shader_generate_debug_info(device, dump_shader, *gs_copy_binary, copy_shader, &nir, 1, &gs_copy_stage.info);
+ radv_shader_generate_debug_info(device, dump_shader, keep_executable_info, *gs_copy_binary, copy_shader, &nir, 1,
+ &gs_copy_stage.info);
return copy_shader;
}
binaries[s] = radv_shader_nir_to_asm(device, &stages[s], nir_shaders, shader_count, pipeline_key,
keep_executable_info, keep_statistic_info);
shaders[s] = radv_shader_create(device, cache, binaries[s], keep_executable_info || dump_shader);
- radv_shader_generate_debug_info(device, dump_shader, binaries[s], shaders[s], nir_shaders, shader_count,
- &stages[s].info);
+ radv_shader_generate_debug_info(device, dump_shader, keep_executable_info, binaries[s], shaders[s], nir_shaders,
+ shader_count, &stages[s].info);
if (s == MESA_SHADER_GEOMETRY && !stages[s].info.is_ngg) {
*gs_copy_shader = radv_create_gs_copy_shader(device, cache, &stages[MESA_SHADER_GEOMETRY], pipeline_key,
shader = radv_shader_create(device, cache, binary, keep_executable_info || dump_shader);
if (shader) {
- radv_shader_generate_debug_info(device, dump_shader, binary, shader, shaders, num_shaders, &stage->info);
+ radv_shader_generate_debug_info(device, dump_shader, keep_executable_info, binary, shader, shaders, num_shaders,
+ &stage->info);
if (shader && keep_executable_info && stage->spirv.size) {
shader->spirv = malloc(stage->spirv.size);
}
void
-radv_shader_generate_debug_info(struct radv_device *device, bool dump_shader, struct radv_shader_binary *binary,
- struct radv_shader *shader, struct nir_shader *const *shaders, int shader_count,
- struct radv_shader_info *info)
+radv_shader_generate_debug_info(struct radv_device *device, bool dump_shader, bool keep_shader_info,
+ struct radv_shader_binary *binary, struct radv_shader *shader,
+ struct nir_shader *const *shaders, int shader_count, struct radv_shader_info *info)
{
- radv_capture_shader_executable_info(device, shader, shaders, shader_count, binary);
+ if (dump_shader || keep_shader_info)
+ radv_capture_shader_executable_info(device, shader, shaders, shader_count, binary);
if (dump_shader) {
fprintf(stderr, "%s", radv_get_shader_name(info, shaders[0]->info.stage));
const struct radv_pipeline_key *key, bool keep_shader_info,
bool keep_statistic_info);
-void radv_shader_generate_debug_info(struct radv_device *device, bool dump_shader, struct radv_shader_binary *binary,
- struct radv_shader *shader, struct nir_shader *const *shaders, int shader_count,
+void radv_shader_generate_debug_info(struct radv_device *device, bool dump_shader, bool keep_shader_info,
+ struct radv_shader_binary *binary, struct radv_shader *shader,
+ struct nir_shader *const *shaders, int shader_count,
struct radv_shader_info *info);
VkResult radv_shader_wait_for_upload(struct radv_device *device, uint64_t seq);