aco: add ACO_DEBUG=novn,noopt,nosched for debugging purposes
To disable value numbering, optimizations and scheduling. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6470>
This commit is contained in:

committed by
Marge Bot

parent
4d40a719b0
commit
502b9daa7a
@@ -614,6 +614,12 @@ RADV driver environment variables
|
|||||||
abort on some suboptimal code generation
|
abort on some suboptimal code generation
|
||||||
``force-waitcnt``
|
``force-waitcnt``
|
||||||
force emitting waitcnt states if there is something to wait for
|
force emitting waitcnt states if there is something to wait for
|
||||||
|
``novn``
|
||||||
|
disable value numbering
|
||||||
|
``noopt``
|
||||||
|
disable various optimizations
|
||||||
|
``noscheduling``
|
||||||
|
disable instructions scheduling
|
||||||
|
|
||||||
radeonsi driver environment variables
|
radeonsi driver environment variables
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -89,8 +89,10 @@ void aco_compile_shader(unsigned shader_count,
|
|||||||
validate(program.get());
|
validate(program.get());
|
||||||
|
|
||||||
/* Optimization */
|
/* Optimization */
|
||||||
aco::value_numbering(program.get());
|
if (!(aco::debug_flags & aco::DEBUG_NO_VN))
|
||||||
aco::optimize(program.get());
|
aco::value_numbering(program.get());
|
||||||
|
if (!(aco::debug_flags & aco::DEBUG_NO_OPT))
|
||||||
|
aco::optimize(program.get());
|
||||||
|
|
||||||
/* cleanup and exec mask handling */
|
/* cleanup and exec mask handling */
|
||||||
aco::setup_reduce_temp(program.get());
|
aco::setup_reduce_temp(program.get());
|
||||||
@@ -121,7 +123,8 @@ void aco_compile_shader(unsigned shader_count,
|
|||||||
aco::collect_presched_stats(program.get());
|
aco::collect_presched_stats(program.get());
|
||||||
|
|
||||||
if (!args->is_trap_handler_shader) {
|
if (!args->is_trap_handler_shader) {
|
||||||
aco::schedule_program(program.get(), live_vars);
|
if (!(aco::debug_flags & aco::DEBUG_NO_SCHED))
|
||||||
|
aco::schedule_program(program.get(), live_vars);
|
||||||
validate(program.get());
|
validate(program.get());
|
||||||
|
|
||||||
/* Register Allocation */
|
/* Register Allocation */
|
||||||
|
@@ -35,6 +35,9 @@ static const struct debug_control aco_debug_options[] = {
|
|||||||
{"validatera", DEBUG_VALIDATE_RA},
|
{"validatera", DEBUG_VALIDATE_RA},
|
||||||
{"perfwarn", DEBUG_PERFWARN},
|
{"perfwarn", DEBUG_PERFWARN},
|
||||||
{"force-waitcnt", DEBUG_FORCE_WAITCNT},
|
{"force-waitcnt", DEBUG_FORCE_WAITCNT},
|
||||||
|
{"novn", DEBUG_NO_VN},
|
||||||
|
{"noopt", DEBUG_NO_OPT},
|
||||||
|
{"nosched", DEBUG_NO_SCHED},
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -52,6 +52,9 @@ enum {
|
|||||||
DEBUG_VALIDATE_RA = 0x2,
|
DEBUG_VALIDATE_RA = 0x2,
|
||||||
DEBUG_PERFWARN = 0x4,
|
DEBUG_PERFWARN = 0x4,
|
||||||
DEBUG_FORCE_WAITCNT = 0x8,
|
DEBUG_FORCE_WAITCNT = 0x8,
|
||||||
|
DEBUG_NO_VN = 0x10,
|
||||||
|
DEBUG_NO_OPT = 0x20,
|
||||||
|
DEBUG_NO_SCHED = 0x40,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user