projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: make max_anisotropy a unsigned bitfield member
[mesa.git]
/
src
/
gallium
/
drivers
/
r300
/
r300_debug.c
diff --git
a/src/gallium/drivers/r300/r300_debug.c
b/src/gallium/drivers/r300/r300_debug.c
index 15308dda1de7ae156927582d708b4aa4f35933a1..b881730848aec0e1f74c02cb4ef78c4af0233090 100644
(file)
--- a/
src/gallium/drivers/r300/r300_debug.c
+++ b/
src/gallium/drivers/r300/r300_debug.c
@@
-22,8
+22,6
@@
#include "r300_context.h"
#include "r300_context.h"
-#include <ctype.h>
-
struct debug_option {
const char * name;
struct debug_option {
const char * name;
@@
-37,6
+35,8
@@
static struct debug_option debug_options[] = {
{ "vp", DBG_VP, "Vertex program handling" },
{ "cs", DBG_CS, "Command submissions" },
{ "draw", DBG_DRAW, "Draw and emit" },
{ "vp", DBG_VP, "Vertex program handling" },
{ "cs", DBG_CS, "Command submissions" },
{ "draw", DBG_DRAW, "Draw and emit" },
+ { "tex", DBG_TEX, "Textures" },
+ { "fall", DBG_FALL, "Fallbacks" },
{ "all", ~0, "Convenience option that enables all debug flags" },
{ "all", ~0, "Convenience option that enables all debug flags" },
@@
-44,10
+44,12
@@
static struct debug_option debug_options[] = {
{ 0, 0, 0 }
};
{ 0, 0, 0 }
};
-void r300_init_debug(struct r300_
context * ctx
)
+void r300_init_debug(struct r300_
screen * screen
)
{
const char * options = debug_get_option("RADEON_DEBUG", 0);
{
const char * options = debug_get_option("RADEON_DEBUG", 0);
- boolean printhint = false;
+ boolean printhint = FALSE;
+ size_t length;
+ struct debug_option * opt;
if (options) {
while(*options) {
if (options) {
while(*options) {
@@
-56,32
+58,31
@@
void r300_init_debug(struct r300_context * ctx)
continue;
}
continue;
}
- size_t length = strcspn(options, " ,");
- struct debug_option * opt;
+ length = strcspn(options, " ,");
for(opt = debug_options; opt->name; ++opt) {
if (!strncmp(options, opt->name, length)) {
for(opt = debug_options; opt->name; ++opt) {
if (!strncmp(options, opt->name, length)) {
-
ctx
->debug |= opt->flag;
+
screen
->debug |= opt->flag;
break;
}
}
if (!opt->name) {
debug_printf("Unknown debug option: %s\n", options);
break;
}
}
if (!opt->name) {
debug_printf("Unknown debug option: %s\n", options);
- printhint =
true
;
+ printhint =
TRUE
;
}
options += length;
}
}
options += length;
}
- if (!
ctx
->debug)
- printhint =
true
;
+ if (!
screen
->debug)
+ printhint =
TRUE
;
}
}
- if (printhint ||
ctx
->debug & DBG_HELP) {
+ if (printhint ||
screen
->debug & DBG_HELP) {
debug_printf("You can enable debug output by setting the RADEON_DEBUG environment variable\n"
"to a comma-separated list of debug options. Available options are:\n");
debug_printf("You can enable debug output by setting the RADEON_DEBUG environment variable\n"
"to a comma-separated list of debug options. Available options are:\n");
- for(
struct debug_option *
opt = debug_options; opt->name; ++opt) {
+ for(opt = debug_options; opt->name; ++opt) {
debug_printf(" %s: %s\n", opt->name, opt->description);
}
}
debug_printf(" %s: %s\n", opt->name, opt->description);
}
}