summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_brw_screen.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_brw_screen.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_brw_screen.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_brw_screen.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/winsys/xlib/xlib_brw_screen.c b/src/gallium/winsys/xlib/xlib_brw_screen.c
index 5344c502ef..51740a9af6 100644
--- a/src/gallium/winsys/xlib/xlib_brw_screen.c
+++ b/src/gallium/winsys/xlib/xlib_brw_screen.c
@@ -42,12 +42,19 @@
#include "util/u_memory.h"
#include "i965simple/brw_winsys.h"
#include "i965simple/brw_screen.h"
+#include "i965simple/brw_context.h"
+
#include "xlib_brw_aub.h"
#include "xlib_brw.h"
#include "xlib.h"
-
+static struct pipe_buffer *
+buffer_from_surface(struct pipe_surface *surface)
+{
+ struct brw_texture *texture = (struct brw_texture *)surface;
+ return texture->buffer;
+}
struct aub_buffer {
char *data;
@@ -226,7 +233,7 @@ aub_flush_frontbuffer( struct pipe_winsys *winsys,
// struct aub_pipe_winsys *iws = aub_pipe_winsys(winsys);
brw_aub_dump_bmp( global_winsys->aubfile,
surface,
- aub_bo(surface->buffer)->offset );
+ aub_bo(buffer_from_surface(surface))->offset );
}
@@ -449,7 +456,7 @@ xlib_brw_display_surface(struct xmesa_buffer *b,
{
brw_aub_dump_bmp( global_winsys->aubfile,
surf,
- aub_bo(surf->buffer)->offset );
+ aub_bo(buffer_from_surface(surf))->offset );
}