* Pauli Nieminen <suokkos@gmail.com>
*/
-#include "utils.h"
+#include "util/debug.h"
-#include "radeon_debug.h"
#include "radeon_common_context.h"
+#include "radeon_debug.h"
#include <stdarg.h>
#include <stdio.h>
-static const struct dri_debug_control debug_control[] = {
+static const struct debug_control debug_control[] = {
{"fall", RADEON_FALLBACKS},
{"tex", RADEON_TEXTURE},
{"ioctl", RADEON_IOCTL},
- {"verts", RADEON_RENDER},
+ {"verts", RADEON_VERTS},
{"render", RADEON_RENDER},
{"swrender", RADEON_SWRENDER},
{"state", RADEON_STATE},
{NULL, 0}
};
-radeon_debug_type_t radeon_enabled_debug_types;
+#if defined(RADEON_R200)
+radeon_debug_type_t r200_enabled_debug_types;
+#elif defined(RADEON_R100)
+radeon_debug_type_t r100_enabled_debug_types;
+#endif
void radeon_init_debug(void)
{
- radeon_enabled_debug_types = driParseDebugString(getenv("RADEON_DEBUG"), debug_control);
+ RADEON_DEBUG = parse_debug_string(getenv("RADEON_DEBUG"), debug_control);
- radeon_enabled_debug_types |= RADEON_GENERAL;
+ RADEON_DEBUG |= RADEON_GENERAL;
}
void _radeon_debug_add_indent(void)
if (radeon->debug.indent_depth < length - 1) {
radeon->debug.indent[radeon->debug.indent_depth] = '\t';
++radeon->debug.indent_depth;
- };
+ }
}
void _radeon_debug_remove_indent(void)
const char* message,
...)
{
+ va_list values;
+
GET_CURRENT_CONTEXT(ctx);
if (ctx) {
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
if (radeon->debug.indent_depth)
fprintf(stderr, "%s", radeon->debug.indent);
}
- va_list values;
va_start( values, message );
vfprintf(stderr, message, values);
va_end( values );