summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_cs.h
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-01-27 04:03:38 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-01 23:30:29 -0800
commit2cb90c8e805d010ba4594264dd9edbbb7f95513a (patch)
tree1010afe32520e17118bf0b92d4d93eb5bfc655d7 /src/gallium/drivers/r300/r300_cs.h
parentf1ba451bcc7764fd2b92fc8408f6b52c1d670b1f (diff)
downloadexternal_mesa3d-2cb90c8e805d010ba4594264dd9edbbb7f95513a.zip
external_mesa3d-2cb90c8e805d010ba4594264dd9edbbb7f95513a.tar.gz
external_mesa3d-2cb90c8e805d010ba4594264dd9edbbb7f95513a.tar.bz2
r300: Count BEGIN_CS, END_CS, warn if count is off.
Diffstat (limited to 'src/gallium/drivers/r300/r300_cs.h')
-rw-r--r--src/gallium/drivers/r300/r300_cs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index d515c2f..653e2fd 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -60,7 +60,8 @@ static uint32_t pack_float_32(float f)
#define CS_LOCALS(context) \
struct r300_winsys* cs_winsys = context->winsys; \
- struct radeon_cs* cs = cs_winsys->cs
+ struct radeon_cs* cs = cs_winsys->cs; \
+ int cs_count;
#define CHECK_CS(size) \
cs_winsys->check_cs(cs, (size))
@@ -70,6 +71,7 @@ static uint32_t pack_float_32(float f)
debug_printf("r300: BEGIN_CS in %s (%s:%d)\n", __FUNCTION__, __FILE__, \
__LINE__); \
cs_winsys->begin_cs(cs, (size), __FILE__, __FUNCTION__, __LINE__); \
+ int cs_count = size; \
} while (0)
#define OUT_CS(value) do { \
@@ -103,6 +105,8 @@ static uint32_t pack_float_32(float f)
#define END_CS do { \
debug_printf("r300: END_CS in %s (%s:%d)\n", __FUNCTION__, __FILE__, \
__LINE__); \
+ if (cs_count != 0) \
+ debug_printf("r300: Warning: cs_count off by %d\n", cs_count); \
cs_winsys->end_cs(cs, __FILE__, __FUNCTION__, __LINE__); \
} while (0)