summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_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/drivers/i915simple/i915_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/drivers/i915simple/i915_screen.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
index 5bb127f3d5..39e48105b3 100644
--- a/src/gallium/drivers/i915simple/i915_screen.c
+++ b/src/gallium/drivers/i915simple/i915_screen.c
@@ -209,7 +209,8 @@ i915_surface_map( struct pipe_screen *screen,
struct pipe_surface *surface,
unsigned flags )
{
- char *map = pipe_buffer_map( screen, surface->buffer, flags );
+ struct i915_texture *tex = (struct i915_texture *)surface->texture;
+ char *map = pipe_buffer_map( screen, tex->buffer, flags );
if (map == NULL)
return NULL;
@@ -228,7 +229,8 @@ static void
i915_surface_unmap(struct pipe_screen *screen,
struct pipe_surface *surface)
{
- pipe_buffer_unmap( screen, surface->buffer );
+ struct i915_texture *tex = (struct i915_texture *)surface->texture;
+ pipe_buffer_unmap( screen, tex->buffer );
}