OSDN Git Service

r300g: Spill a bit more info about implementation errors in surface_copy.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 20 Apr 2010 20:08:55 +0000 (13:08 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 20 Apr 2010 20:10:27 +0000 (13:10 -0700)
compiz appears to hit this. Weird.

src/gallium/drivers/r300/r300_blit.c

index e15c71e..928ad30 100644 (file)
@@ -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,