From b1ed72ebe2599ec178f51d86fd42f26486b9a19b Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 17 Dec 2009 23:41:57 +0100 Subject: Move the remaining format pf_get_* functions to u_format.h. Previously they depended on format blocks, but after removing those they started depending on format encoding. --- src/gallium/auxiliary/util/u_rect.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/gallium/auxiliary/util/u_rect.c') diff --git a/src/gallium/auxiliary/util/u_rect.c b/src/gallium/auxiliary/util/u_rect.c index 72725b59d2..298fbacecb 100644 --- a/src/gallium/auxiliary/util/u_rect.c +++ b/src/gallium/auxiliary/util/u_rect.c @@ -34,6 +34,7 @@ #include "pipe/p_format.h" #include "pipe/p_context.h" #include "pipe/p_screen.h" +#include "util/u_format.h" #include "util/u_rect.h" @@ -57,9 +58,9 @@ util_copy_rect(ubyte * dst, { unsigned i; int src_stride_pos = src_stride < 0 ? -src_stride : src_stride; - int blocksize = pf_get_blocksize(format); - int blockwidth = pf_get_blockwidth(format); - int blockheight = pf_get_blockheight(format); + int blocksize = util_format_get_blocksize(format); + int blockwidth = util_format_get_blockwidth(format); + int blockheight = util_format_get_blockheight(format); assert(blocksize > 0); assert(blockwidth > 0); @@ -105,9 +106,9 @@ util_fill_rect(ubyte * dst, { unsigned i, j; unsigned width_size; - int blocksize = pf_get_blocksize(format); - int blockwidth = pf_get_blockwidth(format); - int blockheight = pf_get_blockheight(format); + int blocksize = util_format_get_blocksize(format); + int blockwidth = util_format_get_blockwidth(format); + int blockheight = util_format_get_blockheight(format); assert(blocksize > 0); assert(blockwidth > 0); @@ -203,9 +204,9 @@ util_surface_copy(struct pipe_context *pipe, PIPE_TRANSFER_WRITE, dst_x, dst_y, w, h); - assert(pf_get_blocksize(dst_format) == pf_get_blocksize(src_format)); - assert(pf_get_blockwidth(dst_format) == pf_get_blockwidth(src_format)); - assert(pf_get_blockheight(dst_format) == pf_get_blockheight(src_format)); + assert(util_format_get_blocksize(dst_format) == util_format_get_blocksize(src_format)); + assert(util_format_get_blockwidth(dst_format) == util_format_get_blockwidth(src_format)); + assert(util_format_get_blockheight(dst_format) == util_format_get_blockheight(src_format)); src_map = pipe->screen->transfer_map(screen, src_trans); dst_map = pipe->screen->transfer_map(screen, dst_trans); @@ -270,7 +271,7 @@ util_surface_fill(struct pipe_context *pipe, if (dst_map) { assert(dst_trans->stride > 0); - switch (pf_get_blocksize(dst_trans->texture->format)) { + switch (util_format_get_blocksize(dst_trans->texture->format)) { case 1: case 2: case 4: -- cgit v1.2.3