Mesa (master): g3dvl: Grab surface pointer when flushing front buffer in SP winsys.

Younes Manton ymanton at kemper.freedesktop.org
Mon Mar 2 18:06:52 UTC 2009


Module: Mesa
Branch: master
Commit: c9fe0f7ab5071a5c6ba2ef13fe96e726ec2b512b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9fe0f7ab5071a5c6ba2ef13fe96e726ec2b512b

Author: Younes Manton <younes.m at gmail.com>
Date:   Wed Feb 25 15:09:20 2009 -0500

g3dvl: Grab surface pointer when flushing front buffer in SP winsys.

---

 src/gallium/winsys/g3dvl/xsp_winsys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/g3dvl/xsp_winsys.c b/src/gallium/winsys/g3dvl/xsp_winsys.c
index acfb8ec..c4623e8 100644
--- a/src/gallium/winsys/g3dvl/xsp_winsys.c
+++ b/src/gallium/winsys/g3dvl/xsp_winsys.c
@@ -6,6 +6,7 @@
 #include <util/u_memory.h>
 #include <util/u_math.h>
 #include <softpipe/sp_winsys.h>
+#include <softpipe/sp_texture.h>
 
 /* pipe_winsys implementation */
 
@@ -162,7 +163,7 @@ static void xsp_flush_frontbuffer(struct pipe_winsys *pws, struct pipe_surface *
 	xsp_winsys->fbimage.width = surface->width;
 	xsp_winsys->fbimage.height = surface->height;
 	xsp_winsys->fbimage.bytes_per_line = surface->width * (xsp_winsys->fbimage.bits_per_pixel >> 3);
-	xsp_winsys->fbimage.data = pipe_surface_map(surface, 0);
+	xsp_winsys->fbimage.data = ((struct xsp_buffer *)softpipe_texture(surface->texture)->buffer)->data + surface->offset;
 
 	XPutImage
 	(
@@ -178,7 +179,6 @@ static void xsp_flush_frontbuffer(struct pipe_winsys *pws, struct pipe_surface *
 		surface->height
 	);
 	XFlush(xsp_context->display);
-	pipe_surface_unmap(surface);
 }
 
 static const char* xsp_get_name(struct pipe_winsys *pws)




More information about the mesa-commit mailing list