mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
nv50/ir: make colorful ir dump output optional
This commit is contained in:
parent
9881bf6e69
commit
96259b5128
1 changed files with 17 additions and 5 deletions
|
|
@ -37,9 +37,8 @@ enum TextStyle
|
|||
TXT_INSN
|
||||
};
|
||||
|
||||
static const char *colour[8] =
|
||||
static const char *_colour[8] =
|
||||
{
|
||||
#if 1
|
||||
"\x1b[00m",
|
||||
"\x1b[34m",
|
||||
"\x1b[35m",
|
||||
|
|
@ -48,11 +47,23 @@ static const char *colour[8] =
|
|||
"\x1b[33m",
|
||||
"\x1b[37m",
|
||||
"\x1b[32m"
|
||||
#else
|
||||
"", "", "", "", "", "", "", ""
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char *_nocolour[8] =
|
||||
{
|
||||
"", "", "", "", "", "", "", ""
|
||||
};
|
||||
|
||||
static const char **colour;
|
||||
|
||||
static void init_colours()
|
||||
{
|
||||
if (getenv("NV50_PROG_DEBUG_NO_COLORS") != NULL)
|
||||
colour = _nocolour;
|
||||
else
|
||||
colour = _colour;
|
||||
}
|
||||
|
||||
static const char *OpClassStr[OPCLASS_OTHER + 1] =
|
||||
{
|
||||
"MOVE",
|
||||
|
|
@ -620,6 +631,7 @@ void
|
|||
Program::print()
|
||||
{
|
||||
PrintPass pass;
|
||||
init_colours();
|
||||
pass.run(this, true, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue