diff options
author | marha <marha@users.sourceforge.net> | 2012-01-06 19:47:46 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2012-01-06 19:47:46 +0100 |
commit | 2d52fd67e716caae85bce150b01bc5c284b12de7 (patch) | |
tree | 2a641392a6affe99603cbaf169c1ab5173879d27 /mesalib/src/gallium/auxiliary/util/u_tile.c | |
parent | d515b895dc5151d102f33b577cafbf63473bbafa (diff) | |
parent | 7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff) | |
download | vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.gz vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.bz2 vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/link_uniforms.cpp
mesalib/src/mesa/drivers/dri/common/drisw_util.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_tile.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_tile.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_tile.c b/mesalib/src/gallium/auxiliary/util/u_tile.c index 02bdb731d..ea4b91f95 100644 --- a/mesalib/src/gallium/auxiliary/util/u_tile.c +++ b/mesalib/src/gallium/auxiliary/util/u_tile.c @@ -344,6 +344,31 @@ z32f_x24s8_get_tile_rgba(const float *src, } } +/*** PIPE_FORMAT_X32_S8X24_UINT ***/ + +/** + * Return S component as four uint32_t in [0..255]. Z part ignored. + */ +static void +x32_s8_get_tile_rgba(const unsigned *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) { + src++; + pRow[0] = + pRow[1] = + pRow[2] = + pRow[3] = (float)(*src++ & 0xff); + } + p += dst_stride; + } +} void pipe_tile_raw_to_rgba(enum pipe_format format, @@ -381,6 +406,9 @@ pipe_tile_raw_to_rgba(enum pipe_format format, case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: z32f_x24s8_get_tile_rgba((float *) src, w, h, dst, dst_stride); break; + case PIPE_FORMAT_X32_S8X24_UINT: + x32_s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); + break; default: util_format_read_4f(format, dst, dst_stride * sizeof(float), |