summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-11 10:11:50 -0700
committerEric Anholt <[email protected]>2013-04-12 16:32:13 -0700
commit9167ba85841d6ad94ec886bc55ab7cb5afc435a4 (patch)
treeecc6c5ae5e09762958fc6cec58ac325199319ef9 /src/mesa/drivers/dri
parentaceba66795bb0da7f09d0af6d9b766e1e52ca9cc (diff)
intel: Improve diagnostics for emit_linear_blit failure path.
This fixes unused variable warnings in the release build, and should be more useful if it ever triggers. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 0946972d4fa..1f3fad51266 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -480,6 +480,7 @@ intel_emit_linear_blit(struct intel_context *intel,
unsigned int src_offset,
unsigned int size)
{
+ struct gl_context *ctx = &intel->ctx;
GLuint pitch, height;
bool ok;
@@ -496,7 +497,8 @@ intel_emit_linear_blit(struct intel_context *intel,
0, 0, /* dst x/y */
pitch, height, /* w, h */
GL_COPY);
- assert(ok);
+ if (!ok)
+ _mesa_problem(ctx, "Failed to linear blit %dx%d\n", pitch, height);
src_offset += pitch * height;
dst_offset += pitch * height;
@@ -511,7 +513,8 @@ intel_emit_linear_blit(struct intel_context *intel,
0, 0, /* dst x/y */
size, 1, /* w, h */
GL_COPY);
- assert(ok);
+ if (!ok)
+ _mesa_problem(ctx, "Failed to linear blit %dx%d\n", size, 1);
}
}