Mesa (master): mesa: ensure pbo stencil buffers are mapped before use
Alan Hourihane
alanh at kemper.freedesktop.org
Fri Apr 3 11:49:58 UTC 2009
Module: Mesa
Branch: master
Commit: f7039fde4f9e1175c3dae534e5b91e22e693124a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7039fde4f9e1175c3dae534e5b91e22e693124a
Author: Alan Hourihane <alanh at vmware.com>
Date: Fri Apr 3 12:49:05 2009 +0100
mesa: ensure pbo stencil buffers are mapped before use
---
src/mesa/state_tracker/st_cb_drawpixels.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index f9f139f..8926aa3 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -640,6 +640,9 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
stmap = screen->transfer_map(screen, pt);
+ pixels = _mesa_map_drawpix_pbo(ctx, unpack, pixels);
+ assert(pixels);
+
/* if width > MAX_WIDTH, have to process image in chunks */
skipPixels = 0;
while (skipPixels < width) {
@@ -705,6 +708,8 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
skipPixels += spanWidth;
}
+ _mesa_unmap_drawpix_pbo(ctx, unpack);
+
/* unmap the stencil buffer */
screen->transfer_unmap(screen, pt);
screen->tex_transfer_destroy(pt);
More information about the mesa-commit
mailing list