summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_fs.c
diff options
context:
space:
mode:
authorTom Stellard <tstellar@gmail.com>2010-10-17 23:17:01 -0700
committerTom Stellard <tstellar@gmail.com>2010-10-18 20:51:05 -0700
commitf822cc22f223a0a4f9cf1cdd5871780e5df11d67 (patch)
treec6527323377efde526a8d8b44b19659d4a805b66 /src/gallium/drivers/r300/r300_fs.c
parent9d2ab6cb00e72fd8b53d0f97578758504b49ee23 (diff)
downloadexternal_mesa3d-f822cc22f223a0a4f9cf1cdd5871780e5df11d67.zip
external_mesa3d-f822cc22f223a0a4f9cf1cdd5871780e5df11d67.tar.gz
external_mesa3d-f822cc22f223a0a4f9cf1cdd5871780e5df11d67.tar.bz2
r300g: Add new debug option for logging vertex/fragment program stats
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.c')
-rw-r--r--src/gallium/drivers/r300/r300_fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c
index d9d4a93..c91532e 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -378,7 +378,8 @@ static void r300_translate_fragment_shader(
/* Setup the compiler. */
memset(&compiler, 0, sizeof(compiler));
rc_init(&compiler.Base);
- compiler.Base.Debug = DBG_ON(r300, DBG_FP);
+ DBG_ON(r300, DBG_FP) ? compiler.Base.Debug |= RC_DBG_LOG : 0;
+ DBG_ON(r300, DBG_P_STAT) ? compiler.Base.Debug |= RC_DBG_STATS : 0;
compiler.code = &shader->code;
compiler.state = shader->compare_state;
@@ -395,7 +396,7 @@ static void r300_translate_fragment_shader(
find_output_registers(&compiler, shader);
- if (compiler.Base.Debug) {
+ if (compiler.Base.Debug & RC_DBG_LOG) {
DBG(r300, DBG_FP, "r300: Initial fragment program\n");
tgsi_dump(tokens, 0);
}