radv: move nir print after linking is done
We now have linking optimisations so we want to delay dumping the
nir until after these are complete.
Fixes: 06f05040eb
(radv: Link shaders)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -1870,8 +1870,13 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
|
|||||||
|
|
||||||
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
|
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
|
||||||
free(codes[i]);
|
free(codes[i]);
|
||||||
if (modules[i] && !pipeline->device->trace_bo)
|
if (modules[i]) {
|
||||||
ralloc_free(nir[i]);
|
if (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS)
|
||||||
|
nir_print_shader(nir[i], stderr);
|
||||||
|
|
||||||
|
if (!pipeline->device->trace_bo)
|
||||||
|
ralloc_free(nir[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs_m.nir)
|
if (fs_m.nir)
|
||||||
|
@@ -291,9 +291,6 @@ radv_shader_compile_to_nir(struct radv_device *device,
|
|||||||
nir_remove_dead_variables(nir, nir_var_local);
|
nir_remove_dead_variables(nir, nir_var_local);
|
||||||
radv_optimize_nir(nir);
|
radv_optimize_nir(nir);
|
||||||
|
|
||||||
if (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS)
|
|
||||||
nir_print_shader(nir, stderr);
|
|
||||||
|
|
||||||
return nir;
|
return nir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user