diff options
author | Roland Scheidegger <[email protected]> | 2010-03-30 01:35:49 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-03-30 01:35:49 +0200 |
commit | 6fb364a1717858d8201b2caf234076ce5d4832ac (patch) | |
tree | d5ba16307b15eeec7f1109bde41cc45c4aab6bcd /src/gallium/auxiliary | |
parent | 4e9690f00ca67e42e31367c50f9c216ad10ef553 (diff) |
gallium: adapt all code to the renamed depth/stencil formats
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_depth.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_pack_color.h | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_tile.c | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_depth.c b/src/gallium/auxiliary/gallivm/lp_bld_depth.c index 4ce1a27a061..c6d0e4bc04e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_depth.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_depth.c @@ -495,8 +495,8 @@ lp_build_depth_stencil_test(LLVMBuilderRef builder, assert(format_desc->block.height == 1); if (stencil[0].enabled) { - assert(format_desc->format == PIPE_FORMAT_Z24S8_UNORM || - format_desc->format == PIPE_FORMAT_S8Z24_UNORM); + assert(format_desc->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED || + format_desc->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM); } assert(z_swizzle < 4); diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h index c5fd7a6783e..ad4a06dc770 100644 --- a/src/gallium/auxiliary/util/u_pack_color.h +++ b/src/gallium/auxiliary/util/u_pack_color.h @@ -446,17 +446,17 @@ util_pack_z(enum pipe_format format, double z) return (uint) (z * 0xffffffff); case PIPE_FORMAT_Z32_FLOAT: return (uint)z; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: case PIPE_FORMAT_Z24X8_UNORM: if (z == 1.0) return 0xffffff; return (uint) (z * 0xffffff); - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: case PIPE_FORMAT_X8Z24_UNORM: if (z == 1.0) return 0xffffff00; return ((uint) (z * 0xffffff)) << 8; - case PIPE_FORMAT_S8_UNORM: + case PIPE_FORMAT_S8_USCALED: /* this case can get it via util_pack_z_stencil() */ return 0; default: @@ -477,13 +477,13 @@ util_pack_z_stencil(enum pipe_format format, double z, uint s) unsigned packed = util_pack_z(format, z); switch (format) { - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: packed |= s << 24; break; - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: packed |= s; break; - case PIPE_FORMAT_S8_UNORM: + case PIPE_FORMAT_S8_USCALED: packed |= s; break; default: diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c index 09b2382733d..e03ee9b8bd6 100644 --- a/src/gallium/auxiliary/util/u_tile.c +++ b/src/gallium/auxiliary/util/u_tile.c @@ -1036,7 +1036,7 @@ z32_get_tile_rgba(const unsigned *src, } -/*** PIPE_FORMAT_Z24S8_UNORM ***/ +/*** PIPE_FORMAT_Z24_UNORM_S8_USCALED ***/ /** * Return Z component as four float in [0,1]. Stencil part ignored. @@ -1063,7 +1063,7 @@ s8z24_get_tile_rgba(const unsigned *src, } -/*** PIPE_FORMAT_S8Z24_UNORM ***/ +/*** PIPE_FORMAT_S8_USCALED_Z24_UNORM ***/ /** * Return Z component as four float in [0,1]. Stencil part ignored. @@ -1271,11 +1271,11 @@ pipe_tile_raw_to_rgba(enum pipe_format format, case PIPE_FORMAT_Z32_UNORM: z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); break; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: case PIPE_FORMAT_Z24X8_UNORM: s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); break; - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: case PIPE_FORMAT_X8Z24_UNORM: z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); break; @@ -1468,11 +1468,11 @@ pipe_put_tile_rgba(struct pipe_context *pipe, case PIPE_FORMAT_Z32_UNORM: /*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ break; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: case PIPE_FORMAT_Z24X8_UNORM: /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ break; - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: case PIPE_FORMAT_X8Z24_UNORM: /*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ break; @@ -1525,7 +1525,7 @@ pipe_get_tile_z(struct pipe_context *pipe, } } break; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: case PIPE_FORMAT_Z24X8_UNORM: { const uint *ptrc @@ -1540,7 +1540,7 @@ pipe_get_tile_z(struct pipe_context *pipe, } } break; - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: case PIPE_FORMAT_X8Z24_UNORM: { const uint *ptrc @@ -1609,7 +1609,7 @@ pipe_put_tile_z(struct pipe_context *pipe, } } break; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_Z24_UNORM_S8_USCALED: { uint *pDest = (uint *) (map + y * pt->stride + x*4); assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); @@ -1636,7 +1636,7 @@ pipe_put_tile_z(struct pipe_context *pipe, } } break; - case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_S8_USCALED_Z24_UNORM: { uint *pDest = (uint *) (map + y * pt->stride + x*4); assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); |