[Glamor] [PATCH 30/34] glamor: Add am assert about an invariant the upload code relies on.

Alex Deucher alexdeucher at gmail.com
Fri Feb 28 10:02:25 PST 2014


From: Eric Anholt <eric at anholt.net>

Ported from Eric's xserver glamor tree.

Signed-off-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/glamor_pixmap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/glamor_pixmap.c b/src/glamor_pixmap.c
index 72cf7b2..36e285f 100644
--- a/src/glamor_pixmap.c
+++ b/src/glamor_pixmap.c
@@ -723,6 +723,7 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex,
 				  GL_NEAREST);
 	dispatch->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
 
+	assert(pbo || bits != 0);
 	if (bits == NULL)
 		dispatch->glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
 				       pbo);
-- 
1.8.3.1



More information about the Glamor mailing list