summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_softpipe.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
committerZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
commit5069bfed29bcee2c89c36c74c6d65d388eb7792e (patch)
tree2aef5035140ca24eef97b5d328e0c29d0460f3a8 /src/gallium/winsys/xlib/xlib_softpipe.c
parentdf73c964d85d2f44d8c62558b5752b2f4443763f (diff)
gallium: remove pipe_buffer from surfaces
this change disassociates, at least from the driver perspective, the surface from buffer. surfaces are technically now views on the textures so make it so by hiding the buffer in the internals of textures.
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_softpipe.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_softpipe.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/winsys/xlib/xlib_softpipe.c b/src/gallium/winsys/xlib/xlib_softpipe.c
index 01d24584e2..586e1dfca5 100644
--- a/src/gallium/winsys/xlib/xlib_softpipe.c
+++ b/src/gallium/winsys/xlib/xlib_softpipe.c
@@ -45,6 +45,7 @@
#include "util/u_math.h"
#include "util/u_memory.h"
#include "softpipe/sp_winsys.h"
+#include "softpipe/sp_texture.h"
#include "xlib.h"
@@ -58,7 +59,7 @@ struct xm_buffer
boolean userBuffer; /** Is this a user-space buffer? */
void *data;
void *mapped;
-
+
XImage *tempImage;
int shm;
XShmSegmentInfo shminfo;
@@ -225,11 +226,12 @@ xm_buffer_destroy(struct pipe_winsys *pws,
* by the XMesaBuffer.
*/
static void
-xlib_softpipe_display_surface(struct xmesa_buffer *b,
+xlib_softpipe_display_surface(struct xmesa_buffer *b,
struct pipe_surface *surf)
{
XImage *ximage;
- struct xm_buffer *xm_buf = xm_buffer(surf->buffer);
+ struct xm_buffer *xm_buf = xm_buffer(
+ softpipe_texture(surf->texture)->buffer);
static boolean no_swap = 0;
static boolean firsttime = 1;