gallium: added some assertions to st_render_texture() to check surface format
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Apr 2008 18:54:52 +0000 (12:54 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Apr 2008 18:54:52 +0000 (12:54 -0600)
Make sure we can really render to the texture surface given its format.

src/mesa/state_tracker/st_cb_fbo.c

index 69dde56e55744553af568b27a7875441798b6c45..2d741d9390848f2f072cda4c333ce149ea17e4e4 100644 (file)
@@ -370,6 +370,8 @@ st_render_texture(GLcontext *ctx,
                                            att->TextureLevel,
                                            att->Zoffset);
    assert(strb->surface);
+   assert(screen->is_format_supported(screen, strb->surface->format, PIPE_TEXTURE));
+   assert(screen->is_format_supported(screen, strb->surface->format, PIPE_SURFACE));
 
    init_renderbuffer_bits(strb, pt->format);