Mesa (master): r300g: Spill a bit more info about implementation errors in surface_copy.

Corbin Simpson csimpson at kemper.freedesktop.org
Tue Apr 20 13:10:34 PDT 2010


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Tue Apr 20 13:08:55 2010 -0700

r300g: Spill a bit more info about implementation errors in surface_copy.

compiz appears to hit this. Weird.

---

 src/gallium/drivers/r300/r300_blit.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index e15c71e..928ad30 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -126,7 +126,13 @@ void r300_surface_copy(struct pipe_context* pipe,
     enum pipe_format old_format = dst->texture->format;
     enum pipe_format new_format = old_format;
 
-    assert(dst->texture->format == src->texture->format);
+    if (dst->texture->format != src->texture->format) {
+        debug_printf("r300: Implementation error: Format mismatch in %s\n"
+            "    : src: %s dst: %s\n", __FUNCTION__,
+            util_format_name(src->texture->format),
+            util_format_name(dst->texture->format));
+        debug_assert(0);
+    }
 
     if (!pipe->screen->is_format_supported(pipe->screen,
                                            old_format, src->texture->target,



More information about the mesa-commit mailing list