nir: add NIR_DEBUG envvar

Move all the NIR related debug environmental variables in a single
NIR_DEBUG one.

Use NIR_DEBUG=help to print all the available options.

v2:
 - Use a macro to simplify (Marcin, Jason)
 - Remove wrong changes (Marcin)

v3 (Marcin):
 - Remove rendundant NIR mentioning in option descriptions.
 - Unwrap option descriptions.
 - Ensure the constant is unsigned.
 - Use extern array to remove switch.

v4:
 - Add missing kernel shader (Jason).
 - Add unlikely() (Marcin).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13840>
This commit is contained in:
Juan A. Suarez Romero
2021-11-17 16:10:52 +01:00
committed by Marge Bot
parent cc7db1fc53
commit f77ccdfb4a
11 changed files with 154 additions and 67 deletions

View File

@@ -207,15 +207,11 @@ The following are only applicable for drivers that uses NIR, as they
modify the behavior for the common ``NIR_PASS`` and ``NIR_PASS_V`` macros,
that wrap calls to NIR lowering/optimizations.
:envvar:`NIR_PRINT`
If defined, the resulting NIR shader will be printed out at each
successful NIR lowering/optimization call.
:envvar:`NIR_TEST_CLONE`
If defined, cloning a NIR shader would be tested at each successful
NIR lowering/optimization call.
:envvar:`NIR_TEST_SERIALIZE`
If defined, serialize and deserialize a NIR shader would be tested at
each successful NIR lowering/optimization call.
:envvar:`NIR_DEBUG`
a comma-separated list of debug options to apply to NIR
shaders. Use `NIR_DEBUG=help` to print a list of available options.
:envvar:`NIR_SKIP`
a comma-separated list of optimization/lowering passes to skip.
Mesa Xlib driver environment variables
--------------------------------------