gallium: added some assertions to be sure the blit's surface formats are suitable
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Apr 2008 18:55:41 +0000 (12:55 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Apr 2008 18:55:41 +0000 (12:55 -0600)
src/gallium/auxiliary/util/u_blit.c

index 1105066cb8210f9e126414f8c6bb2adf7a4b8d81..9e9912c6e4679f211d0f0e4d34c0d9caa800c1e9 100644 (file)
@@ -264,6 +264,9 @@ util_blit_pixels(struct blit_state *ctx,
       dstY1 = tmp;
    }
 
+   assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE));
+   assert(screen->is_format_supported(screen, dst->format, PIPE_SURFACE));
+
    /*
     * XXX for now we're always creating a temporary texture.
     * Strictly speaking that's not always needed.