summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-02-23 17:21:36 +0000
committerJosé Fonseca <[email protected]>2009-02-23 17:21:36 +0000
commit37f21fce3bd323c361291215edeb7d8cf5f4335b (patch)
tree2909c90da7bff47ba359d50bde242b79a632210b /src/gallium/auxiliary/util
parent7399d56ec6019e00297eef57f802a53698baa8ad (diff)
parent60e35ebf1476c31eb5d7c207ab8e9db77fcad896 (diff)
Merge commit 'origin/gallium-0.1'
Conflicts: src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c src/gallium/auxiliary/util/u_tile.c
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_tile.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 56f2f577ccf..d31ca9c029e 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -882,6 +882,27 @@ ycbcr_get_tile_rgba(const ushort *src,
}
+static void
+fake_get_tile_rgba(const ushort *src,
+ unsigned w, unsigned h,
+ float *p,
+ unsigned dst_stride)
+{
+ unsigned i, j;
+
+ for (i = 0; i < h; i++) {
+ float *pRow = p;
+ for (j = 0; j < w; j++, pRow += 4) {
+ pRow[0] =
+ pRow[1] =
+ pRow[2] =
+ pRow[3] = (i ^ j) & 1 ? 1.0f : 0.0f;
+ }
+ p += dst_stride;
+ }
+}
+
+
void
pipe_tile_raw_to_rgba(enum pipe_format format,
void *src,
@@ -948,7 +969,8 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
ycbcr_get_tile_rgba((ushort *) src, w, h, dst, dst_stride, TRUE);
break;
default:
- assert(0);
+ debug_printf("%s: unsupported format %s\n", __FUNCTION__, pf_name(format));
+ fake_get_tile_rgba(src, w, h, dst, dst_stride);
}
}
@@ -1050,7 +1072,7 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
- assert(0);
+ debug_printf("%s: unsupported format %s\n", __FUNCTION__, pf_name(pt->format));
}
pipe_put_tile_raw(pt, x, y, w, h, packed, 0);