X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_debug.c;h=3009cde9d5181c44c08546330121381790570a74;hb=f67bc2e87255298ac22e8ccd98f482cc62d0ec26;hp=c7d26ce33cf4a35ca40ad1234e3c88d72e5b24c3;hpb=9644fa6c48f596875f6955728c3a8af1b01a5028;p=mesa.git diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c index c7d26ce33cf..3009cde9d51 100644 --- a/src/mesa/state_tracker/st_debug.c +++ b/src/mesa/state_tracker/st_debug.c @@ -41,6 +41,32 @@ +#ifdef DEBUG +int ST_DEBUG = 0; + +static const struct debug_named_value st_debug_flags[] = { + { "mesa", DEBUG_MESA }, + { "tgsi", DEBUG_TGSI }, + { "pipe", DEBUG_PIPE }, + { "tex", DEBUG_TEX }, + { "fallback", DEBUG_FALLBACK }, + { "screen", DEBUG_SCREEN }, + { "query", DEBUG_QUERY }, + {NULL, 0} +}; +#endif + + +void +st_debug_init(void) +{ +#ifdef DEBUG + ST_DEBUG = debug_get_flags_option("ST_DEBUG", st_debug_flags, 0 ); +#endif +} + + + /** * Print current state. May be called from inside gdb to see currently * bound vertex/fragment shaders and associated constants. @@ -68,3 +94,5 @@ st_print_current(void) if (st->fp->Base.Base.Parameters) _mesa_print_parameter_list(st->fp->Base.Base.Parameters); } + +