summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-02-25 15:09:20 -0500
committerYounes Manton <younes.m@gmail.com>2009-03-02 13:05:05 -0500
commitc9fe0f7ab5071a5c6ba2ef13fe96e726ec2b512b (patch)
treea59cccc5bc0e7c25a838b945e22239e0146c988c
parent07e50058a5699fc9279de6bf5d1449d52ccdc476 (diff)
g3dvl: Grab surface pointer when flushing front buffer in SP winsys.
-rw-r--r--src/gallium/winsys/g3dvl/xsp_winsys.c4
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 acfb8ec4ea..c4623e82f9 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)