diff options
author | Roland Scheidegger <sroland@vmware.com> | 2009-12-02 02:08:26 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2009-12-02 02:08:26 +0100 |
commit | c78748a5274e58bcbb122923edf81065be9bbe16 (patch) | |
tree | 9b22e49cfb1a1edb1a1acfd086245fbd8ac83b2b /src/gallium/drivers/i915/i915_surface.c | |
parent | decf6ed810eae473d043a4a399a5a84f1378a725 (diff) | |
download | external_mesa3d-c78748a5274e58bcbb122923edf81065be9bbe16.zip external_mesa3d-c78748a5274e58bcbb122923edf81065be9bbe16.tar.gz external_mesa3d-c78748a5274e58bcbb122923edf81065be9bbe16.tar.bz2 |
gallium: adapt drivers to interface cleanups
Diffstat (limited to 'src/gallium/drivers/i915/i915_surface.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_surface.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c index ab8331f..24e1024 100644 --- a/src/gallium/drivers/i915/i915_surface.c +++ b/src/gallium/drivers/i915/i915_surface.c @@ -48,17 +48,19 @@ i915_surface_copy(struct pipe_context *pipe, { struct i915_texture *dst_tex = (struct i915_texture *)dst->texture; struct i915_texture *src_tex = (struct i915_texture *)src->texture; + struct pipe_texture *dpt = &dst_tex->base; + struct pipe_texture *spt = &src_tex->base; assert( dst != src ); - assert( dst_tex->base.block.size == src_tex->base.block.size ); - assert( dst_tex->base.block.width == src_tex->base.block.height ); - assert( dst_tex->base.block.height == src_tex->base.block.height ); - assert( dst_tex->base.block.width == 1 ); - assert( dst_tex->base.block.height == 1 ); + assert( pf_get_blocksize(dpt->format) == pf_get_blocksize(spt->format) ); + assert( pf_get_blockwidth(dpt->format) == pf_get_blockwidth(spt->format) ); + assert( pf_get_blockheight(dpt->format) == pf_get_blockheight(spt->format) ); + assert( pf_get_blockwidth(dpt->format) == 1 ); + assert( pf_get_blockheight(dpt->format) == 1 ); i915_copy_blit( i915_context(pipe), FALSE, - dst_tex->base.block.size, + pf_get_blocksize(dpt->format), (unsigned short) src_tex->stride, src_tex->buffer, src->offset, (unsigned short) dst_tex->stride, dst_tex->buffer, dst->offset, (short) srcx, (short) srcy, (short) dstx, (short) dsty, (short) width, (short) height ); @@ -72,12 +74,13 @@ i915_surface_fill(struct pipe_context *pipe, unsigned width, unsigned height, unsigned value) { struct i915_texture *tex = (struct i915_texture *)dst->texture; + struct pipe_texture *pt = &tex->base; - assert(tex->base.block.width == 1); - assert(tex->base.block.height == 1); + assert(pf_get_blockwidth(pt->format) == 1); + assert(pf_get_blockheight(pt->format) == 1); i915_fill_blit( i915_context(pipe), - tex->base.block.size, + pf_get_blocksize(pt->format), (unsigned short) tex->stride, tex->buffer, dst->offset, (short) dstx, (short) dsty, |