mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
agx: Add AGX_MESA_DEBUG=noopt option
To disable the optimizer. Trying to root cause a Neverball bug, this gives one less thing to worry. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>
This commit is contained in:
parent
f3877f56ba
commit
24c3084411
2 changed files with 9 additions and 5 deletions
|
|
@ -39,6 +39,7 @@ static const struct debug_named_value agx_debug_options[] = {
|
|||
{"verbose", AGX_DBG_VERBOSE, "Disassemble verbosely"},
|
||||
{"internal", AGX_DBG_INTERNAL, "Dump even internal shaders"},
|
||||
{"novalidate",AGX_DBG_NOVALIDATE,"Skip IR validation in debug builds"},
|
||||
{"noopt", AGX_DBG_NOOPT, "Disable backend optimizations"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
@ -1743,12 +1744,14 @@ agx_compile_shader_nir(nir_shader *nir,
|
|||
if (agx_debug & AGX_DBG_SHADERS && !skip_internal)
|
||||
agx_print_shader(ctx, stdout);
|
||||
|
||||
agx_optimizer(ctx);
|
||||
agx_dce(ctx);
|
||||
agx_validate(ctx, "Optimization");
|
||||
if (likely(!(agx_debug & AGX_DBG_NOOPT))) {
|
||||
agx_optimizer(ctx);
|
||||
agx_dce(ctx);
|
||||
agx_validate(ctx, "Optimization");
|
||||
|
||||
if (agx_debug & AGX_DBG_SHADERS && !skip_internal)
|
||||
agx_print_shader(ctx, stdout);
|
||||
if (agx_debug & AGX_DBG_SHADERS && !skip_internal)
|
||||
agx_print_shader(ctx, stdout);
|
||||
}
|
||||
|
||||
agx_ra(ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ enum agx_dbg {
|
|||
AGX_DBG_VERBOSE = BITFIELD_BIT(3),
|
||||
AGX_DBG_INTERNAL = BITFIELD_BIT(4),
|
||||
AGX_DBG_NOVALIDATE = BITFIELD_BIT(5),
|
||||
AGX_DBG_NOOPT = BITFIELD_BIT(6),
|
||||
};
|
||||
|
||||
extern int agx_debug;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue