[PATCH 25/27] glamor: Add an assert about an invariant the upload code relies on.

Eric Anholt eric at anholt.net
Tue Mar 11 14:30:39 PDT 2014


Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_pixmap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
index f4782e6..ff07483 100644
--- a/glamor/glamor_pixmap.c
+++ b/glamor/glamor_pixmap.c
@@ -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)
-- 
1.9.0



More information about the xorg-devel mailing list