Mesa (master): gallium/util: simplify pipe_get_tile_rgba()
Brian Paul
brianp at kemper.freedesktop.org
Sun Jan 23 01:35:36 UTC 2011
Module: Mesa
Branch: master
Commit: 3ce1ec853b561dd4731a4d62395d5e50df26e868
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ce1ec853b561dd4731a4d62395d5e50df26e868
Author: Brian Paul <brianp at vmware.com>
Date: Sat Jan 22 17:03:51 2011 -0700
gallium/util: simplify pipe_get_tile_rgba()
Implement it in terms of pipe_get_tile_rgba_format()
---
src/gallium/auxiliary/util/u_tile.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 24b02be..ae86213 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -367,26 +367,7 @@ pipe_get_tile_rgba(struct pipe_context *pipe,
uint x, uint y, uint w, uint h,
float *p)
{
- unsigned dst_stride = w * 4;
- void *packed;
- enum pipe_format format = pt->resource->format;
-
- if (u_clip_tile(x, y, &w, &h, &pt->box))
- return;
-
- packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
-
- if (!packed)
- return;
-
- if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV)
- assert((x & 1) == 0);
-
- pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0);
-
- pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
-
- FREE(packed);
+ pipe_get_tile_rgba_format(pipe, pt, x, y, w, h, pt->resource->format, p);
}
More information about the mesa-commit
mailing list