Mesa (gallium-mesa-7.4): mesa: ensure pbo stencil buffers are mapped before use
Alan Hourihane
alanh at kemper.freedesktop.org
Fri Apr 3 11:51:24 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 151b5385b640fa8e38406a569640ac57e53860a1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=151b5385b640fa8e38406a569640ac57e53860a1
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 32bf214..6ecabab 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -756,6 +756,9 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
stmap = screen->surface_map(screen, ps,
PIPE_BUFFER_USAGE_CPU_WRITE);
+ 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) {
@@ -810,6 +813,8 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
skipPixels += spanWidth;
}
+ _mesa_unmap_drawpix_pbo(ctx, unpack);
+
/* unmap the stencil buffer */
screen->surface_unmap(screen, ps);
pipe_surface_reference(&ps, NULL);
More information about the mesa-commit
mailing list