summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple/i915_surface.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-02-02 23:47:16 -0500
committerZack Rusin <[email protected]>2009-02-02 23:47:16 -0500
commit5069bfed29bcee2c89c36c74c6d65d388eb7792e (patch)
tree2aef5035140ca24eef97b5d328e0c29d0460f3a8 /src/gallium/drivers/i915simple/i915_surface.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_surface.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_surface.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915simple/i915_surface.c b/src/gallium/drivers/i915simple/i915_surface.c
index 5ffdb76682c..94e2deaf615 100644
--- a/src/gallium/drivers/i915simple/i915_surface.c
+++ b/src/gallium/drivers/i915simple/i915_surface.c
@@ -74,13 +74,15 @@ i915_surface_copy(struct pipe_context *pipe,
pipe->screen->surface_unmap(pipe->screen, dst);
}
else {
+ struct i915_texture *dst_tex = (struct i915_texture *)dst->texture;
+ struct i915_texture *src_tex = (struct i915_texture *)src->texture;
assert(dst->block.width == 1);
assert(dst->block.height == 1);
i915_copy_blit( i915_context(pipe),
do_flip,
dst->block.size,
- (unsigned short) src->stride, src->buffer, src->offset,
- (unsigned short) dst->stride, dst->buffer, dst->offset,
+ (unsigned short) src->stride, src_tex->buffer, src->offset,
+ (unsigned short) dst->stride, dst_tex->buffer, dst->offset,
(short) srcx, (short) srcy, (short) dstx, (short) dsty, (short) width, (short) height );
}
}
@@ -102,12 +104,13 @@ i915_surface_fill(struct pipe_context *pipe,
pipe->screen->surface_unmap(pipe->screen, dst);
}
else {
+ struct i915_texture *tex = (struct i915_texture *)dst->texture;
assert(dst->block.width == 1);
assert(dst->block.height == 1);
i915_fill_blit( i915_context(pipe),
dst->block.size,
(unsigned short) dst->stride,
- dst->buffer, dst->offset,
+ tex->buffer, dst->offset,
(short) dstx, (short) dsty,
(short) width, (short) height,
value );