glamor: Don't forget to unmap our PBOs before using them to upload.
authorEric Anholt <eric@anholt.net>
Sun, 12 Jan 2014 05:26:01 +0000 (21:26 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 17 Mar 2014 21:30:57 +0000 (14:30 -0700)
commitd07d2c3c5f95fd644ef563004dfa7f3c53904168
tree999f453badfa584cf38e295b41494d5500a23208
parent64146e4560fdf3c3a40d023ac8e22259915b05ad
glamor: Don't forget to unmap our PBOs before using them to upload.

From the GL_ARB_vertex_buffer_object spec:

    After the client has specified the contents of a mapped data store,
    and before the data in that store are dereferenced by any GL commands,
    the mapping must be relinquished by calling

        boolean UnmapBufferARB(enum target);

Our mappings were only getting reaped at PBO destroy time, after the
upload.  If the GL implementation wasn't coherent, it would have used
stale data to do the texture upload.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Markus Wick <markus@selfnet.de>
glamor/glamor_pixmap.c