summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-12-16 13:42:39 -0800
committerEric Anholt <[email protected]>2011-12-29 09:33:56 -0800
commitb890f1090c6d640605d5c45cfcf71cef91d59865 (patch)
treec531e075a8d1888007580a6f40882b74287fc22d /src/mesa
parent7f854a5028ef00a0e041e78a770456204dc58eef (diff)
intel: Make the batchbuffer flush debug more useful.
We were printing out the line triggering the flush, but a variety of different causes just printed the line number for intel_flush()'s call of intel_batchbuffer_flush(). Plumb the line numbers from the caller of intel_flush() on through.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 068b305bded..ecc03a21be5 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -508,14 +508,14 @@ intel_flush_rendering_to_batch(struct gl_context *ctx)
}
void
-intel_flush(struct gl_context *ctx)
+_intel_flush(struct gl_context *ctx, const char *file, int line)
{
struct intel_context *intel = intel_context(ctx);
intel_flush_rendering_to_batch(ctx);
if (intel->batch.used)
- intel_batchbuffer_flush(intel);
+ _intel_batchbuffer_flush(intel, file, line);
}
static void
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index ca01120db6f..5fe8e249690 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -506,7 +506,9 @@ extern bool intelInitContext(struct intel_context *intel,
extern void intelFinish(struct gl_context * ctx);
extern void intel_flush_rendering_to_batch(struct gl_context *ctx);
-extern void intel_flush(struct gl_context * ctx);
+extern void _intel_flush(struct gl_context * ctx, const char *file, int line);
+
+#define intel_flush(ctx) _intel_flush(ctx, __FILE__, __LINE__)
extern void intelInitDriverFunctions(struct dd_function_table *functions);