Module: Mesa
Branch: master
Commit: 1a77f8af9bc9982d76a7f602712eb1a5c23ec14e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a77f8af9bc9982d76a7f602712eb1a5c23ec14e

Author: Eric Anholt <[email protected]>
Date:   Wed Mar 17 09:26:37 2010 -0700

intel: Assert that the linear blits succeed.

We don't have any fallback code here, and we want to avoid this path
if failure would happen, so just assert.

---

 src/mesa/drivers/dri/intel/intel_blit.c |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_blit.c 
b/src/mesa/drivers/dri/intel/intel_blit.c
index f2769aa..f4f93b5 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -482,6 +482,7 @@ intel_emit_linear_blit(struct intel_context *intel,
                       unsigned int size)
 {
    GLuint pitch, height;
+   GLboolean ok;
 
    /* Blits are in a different ringbuffer so we don't use them. */
    assert(intel->gen < 6);
@@ -489,25 +490,27 @@ intel_emit_linear_blit(struct intel_context *intel,
    /* The pitch is a signed value. */
    pitch = MIN2(size, (1 << 15) - 1);
    height = size / pitch;
-   intelEmitCopyBlit(intel, 1,
-                    pitch, src_bo, src_offset, I915_TILING_NONE,
-                    pitch, dst_bo, dst_offset, I915_TILING_NONE,
-                    0, 0, /* src x/y */
-                    0, 0, /* dst x/y */
-                    pitch, height, /* w, h */
-                    GL_COPY);
+   ok = intelEmitCopyBlit(intel, 1,
+                         pitch, src_bo, src_offset, I915_TILING_NONE,
+                         pitch, dst_bo, dst_offset, I915_TILING_NONE,
+                         0, 0, /* src x/y */
+                         0, 0, /* dst x/y */
+                         pitch, height, /* w, h */
+                         GL_COPY);
+   assert(ok);
 
    src_offset += pitch * height;
    dst_offset += pitch * height;
    size -= pitch * height;
    assert (size < (1 << 15));
    if (size != 0) {
-      intelEmitCopyBlit(intel, 1,
-                       size, src_bo, src_offset, I915_TILING_NONE,
-                       size, dst_bo, dst_offset, I915_TILING_NONE,
-                       0, 0, /* src x/y */
-                       0, 0, /* dst x/y */
-                       size, 1, /* w, h */
-                       GL_COPY);
+      ok = intelEmitCopyBlit(intel, 1,
+                            size, src_bo, src_offset, I915_TILING_NONE,
+                            size, dst_bo, dst_offset, I915_TILING_NONE,
+                            0, 0, /* src x/y */
+                            0, 0, /* dst x/y */
+                            size, 1, /* w, h */
+                            GL_COPY);
+      assert(ok);
    }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to