mesa: replace assertion with no-op function assignment
authorBrian Paul <brianp@vmware.com>
Thu, 24 Sep 2009 18:37:34 +0000 (12:37 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 24 Sep 2009 18:37:34 +0000 (12:37 -0600)
src/mesa/main/texrender.c

index cc74d58fbd181de19cf3f6d47d1ff50855f2de3a..53be83b05cee23974f3aa20ff8a3c627e3c7a742 100644 (file)
@@ -397,6 +397,14 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb,
 }
 
 
+static void
+store_nop(struct gl_texture_image *texImage,
+          GLint col, GLint row, GLint img,
+          const void *texel)
+{
+}
+
+
 static void
 delete_texture_wrapper(struct gl_renderbuffer *rb)
 {
@@ -462,7 +470,10 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
    ASSERT(trb->TexImage);
 
    trb->Store = trb->TexImage->TexFormat->StoreTexel;
-   ASSERT(trb->Store);
+   if (!trb->Store) {
+      /* we'll never draw into some textures (compressed formats) */
+      trb->Store = store_nop;
+   }
 
    if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
       trb->Yoffset = att->Zoffset;