uint swizzle_g,
uint swizzle_b,
uint swizzle_a,
+ enum pipe_format format,
float *p)
{
+ unsigned dst_stride = w * 4;
+ void *packed;
uint i;
float rgba01[6];
- pipe_get_tile_rgba(pt, x, y, w, h, p);
+ if (pipe_clip_tile(x, y, &w, &h, pt)) {
+ 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(pt, x, y, w, h, packed, 0);
+
+ pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
+
+ FREE(packed);
if (swizzle_r == PIPE_SWIZZLE_RED &&
swizzle_g == PIPE_SWIZZLE_GREEN &&
tc->swizzle_g = view->swizzle_g;
tc->swizzle_b = view->swizzle_b;
tc->swizzle_a = view->swizzle_a;
+ tc->format = view->format;
}
/* mark as entries as invalid/empty */
tc->swizzle_g,
tc->swizzle_b,
tc->swizzle_a,
+ tc->format,
(float *) tile->data.color);
tile->addr = addr;
}