aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-27 10:48:05 +0100
committermarha <marha@users.sourceforge.net>2013-02-27 10:48:05 +0100
commit9bed5520560f553ac8ad4985ed41b31499d903fc (patch)
treee7e6587df3f87e4d5398da78a6b0761171da7d68 /mesalib/src/mesa/state_tracker/st_cb_bitmap.c
parentb14c3b05e45201bbbbb3a4beba260c3d6ff31003 (diff)
parentc74ef795c7282681616decc36a9a81cd1b1b6ec7 (diff)
downloadvcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.tar.gz
vcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.tar.bz2
vcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 mesa pixman xkeyboard-config
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index 63dbdb29b..36fffe90d 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -675,11 +675,12 @@ st_flush_bitmap_cache(struct st_context *st)
* \return GL_TRUE for success, GL_FALSE if bitmap is too large, etc.
*/
static GLboolean
-accum_bitmap(struct st_context *st,
+accum_bitmap(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
{
+ struct st_context *st = ctx->st;
struct bitmap_cache *cache = st->bitmap.cache;
int px = -999, py = -999;
const GLfloat z = st->ctx->Current.RasterPos[2];
@@ -729,9 +730,17 @@ accum_bitmap(struct st_context *st,
/* create the transfer if needed */
create_cache_trans(st);
+ /* PBO source... */
+ bitmap = _mesa_map_pbo_source(ctx, unpack, bitmap);
+ if (!bitmap) {
+ return FALSE;
+ }
+
unpack_bitmap(st, px, py, width, height, unpack, bitmap,
cache->buffer, BITMAP_CACHE_WIDTH);
+ _mesa_unmap_pbo_source(ctx, unpack);
+
return GL_TRUE; /* accumulated */
}
@@ -764,7 +773,7 @@ st_Bitmap(struct gl_context *ctx, GLint x, GLint y,
semantic_indexes);
}
- if (UseBitmapCache && accum_bitmap(st, x, y, width, height, unpack, bitmap))
+ if (UseBitmapCache && accum_bitmap(ctx, x, y, width, height, unpack, bitmap))
return;
pt = make_bitmap_texture(ctx, width, height, unpack, bitmap);