mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
i965/nir: Print NIR on INTEL_DEBUG=fs.
This is useful for debugging and looking for optimization opportunities. It will need to be expanded when we add support for other scalar stages. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
faa38e16aa
commit
f3e06fcc6a
1 changed files with 11 additions and 0 deletions
|
|
@ -93,6 +93,12 @@ fs_visitor::emit_nir_code()
|
|||
nir_validate_shader(nir);
|
||||
nir_copy_prop(nir);
|
||||
nir_validate_shader(nir);
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_WM) {
|
||||
fprintf(stderr, "NIR (SSA form) for fragment shader:\n");
|
||||
nir_print_shader(nir, stderr);
|
||||
}
|
||||
|
||||
nir_convert_from_ssa(nir);
|
||||
nir_validate_shader(nir);
|
||||
nir_lower_vec_to_movs(nir);
|
||||
|
|
@ -134,6 +140,11 @@ fs_visitor::emit_nir_code()
|
|||
nir_emit_impl(overload->impl);
|
||||
}
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_WM) {
|
||||
fprintf(stderr, "NIR (final form) for fragment shader:\n");
|
||||
nir_print_shader(nir, stderr);
|
||||
}
|
||||
|
||||
ralloc_free(nir);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue