From dd9dc7df80d208b884b4c090e4408c9a12aa6095 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Apr 2008 12:54:52 -0600 Subject: [PATCH] gallium: added some assertions to st_render_texture() to check surface format Make sure we can really render to the texture surface given its format. --- src/mesa/state_tracker/st_cb_fbo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 69dde56e557..2d741d93908 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -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); -- 2.30.2