glamor: Add an assert about an invariant the upload code relies on.
authorEric Anholt <eric@anholt.net>
Sun, 12 Jan 2014 05:11:18 +0000 (21:11 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 17 Mar 2014 21:30:57 +0000 (14:30 -0700)
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Markus Wick <markus@selfnet.de>
glamor/glamor_pixmap.c

index bc7be9d..1bbcc55 100644 (file)
@@ -725,6 +725,7 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex,
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
     glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
 
+    assert(pbo || bits != 0);
     if (bits == NULL)
         glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo);
     if (non_sub)