mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
tgsi: add debug_printf version of tgsi_dump
This commit is contained in:
parent
78302c7ca3
commit
d34bc880a4
2 changed files with 26 additions and 0 deletions
|
|
@ -1563,3 +1563,25 @@ tgsi_dump_str(
|
|||
|
||||
*str = dump.text;
|
||||
}
|
||||
|
||||
|
||||
void tgsi_debug_dump( struct tgsi_token *tokens )
|
||||
{
|
||||
char *str, *p;
|
||||
|
||||
tgsi_dump_str( &str, tokens, 0 );
|
||||
|
||||
p = str;
|
||||
while (p != NULL)
|
||||
{
|
||||
char *end = strchr( p, '\n' );
|
||||
if (end != NULL)
|
||||
{
|
||||
*end++ = '\0';
|
||||
}
|
||||
debug_printf( "%s\n", p );
|
||||
p = end;
|
||||
}
|
||||
|
||||
FREE( str );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ tgsi_dump_str(
|
|||
const struct tgsi_token *tokens,
|
||||
unsigned flags );
|
||||
|
||||
/* Dump to debug_printf()
|
||||
*/
|
||||
void tgsi_debug_dump( struct tgsi_token *tokens );
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue