- case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- /*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
- break;
- case PIPE_FORMAT_Z32_FLOAT:
- /*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
- break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
- /*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
- break;
- default:
- util_format_write_4f(format,
- p, src_stride * sizeof(float),
- packed, util_format_get_stride(format, w),
- 0, 0, w, h);
- }
-
- pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
-
- FREE(packed);
-}
-
-void
-pipe_put_tile_i_format(struct pipe_transfer *pt,
- void *dst,
- uint x, uint y, uint w, uint h,
- enum pipe_format format,
- const int *p)
-{
- unsigned src_stride = w * 4;
- void *packed;
-
- 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;
-
- util_format_write_4i(format,
- p, src_stride * sizeof(float),
- packed, util_format_get_stride(format, w),
- 0, 0, w, h);
-
- pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
-
- FREE(packed);
-}
-
-void
-pipe_put_tile_ui_format(struct pipe_transfer *pt,
- void *dst,
- uint x, uint y, uint w, uint h,
- enum pipe_format format,
- const unsigned int *p)
-{
- unsigned src_stride = w * 4;
- void *packed;
-
- 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;
-
- util_format_write_4ui(format,
- p, src_stride * sizeof(float),
- packed, util_format_get_stride(format, w),
- 0, 0, w, h);
-
- pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
-
- FREE(packed);
-}
-
-/**
- * Get a block of Z values, converted to 32-bit range.
- */
-void
-pipe_get_tile_z(struct pipe_transfer *pt,
- const void *src,
- uint x, uint y, uint w, uint h,
- uint *z)
-{
- const uint dstStride = w;
- const ubyte *map = src;
- uint *pDest = z;
- uint i, j;
- enum pipe_format format = pt->resource->format;
-
- if (u_clip_tile(x, y, &w, &h, &pt->box))
- return;
-
- switch (format) {
- case PIPE_FORMAT_Z32_UNORM:
- {
- const uint *ptrc
- = (const uint *)(map + y * pt->stride + x*4);
- for (i = 0; i < h; i++) {
- memcpy(pDest, ptrc, 4 * w);
- pDest += dstStride;
- ptrc += pt->stride/4;
- }
- }