[Mesa-dev] [PATCH] gallium: kill off PIPE_FORMAT_Z32_UNORM with extreme prejudice
Marek Olšák
maraeo at gmail.com
Fri Oct 25 02:38:31 CEST 2013
Sounds good to me.
Marek
On Thu, Oct 24, 2013 at 8:48 PM, <sroland at vmware.com> wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> This format, while still supported in OpenGL (but optional) and glx, is just
> causing major nuisance everywhere and needs special code in some places,
> because things like 1 << depth_bits don't work.
> It is also the reason why we chose (just like in GL) depth clear values as
> doubles and not floats.
> The format however is just a disaster, no hw (as far as I know) supports it
> (because hw has all float pipelines, and floats don't have enough mantissa
> bits), and while we CLAIM to support it in software rasterizers, fact is it
> cannot (and never will) really work right, unless we wouldn't use floats for
> depth calculations. E.g. depth offsets can't work right (small depth bias will
> disappear with primitive depths > 1/256 due to the float calcs without enough
> mantissa bits), and it is generally useless (since the calculations are all
> float, use a float buffer if you need something better than z24 unorm).
> ---
> src/gallium/auxiliary/util/u_format.csv | 1 -
> src/gallium/auxiliary/util/u_format.h | 4 +-
> src/gallium/auxiliary/util/u_format_tests.c | 3 -
> src/gallium/auxiliary/util/u_format_zs.c | 69 --------------------
> src/gallium/auxiliary/util/u_pack_color.h | 6 --
> src/gallium/auxiliary/util/u_tile.c | 56 ----------------
> src/gallium/drivers/ilo/ilo_format.c | 2 +-
> src/gallium/drivers/softpipe/sp_quad_depth_test.c | 17 -----
> src/gallium/drivers/svga/svga_format.c | 3 -
> src/gallium/drivers/svga/svga_pipe_misc.c | 4 --
> src/gallium/include/pipe/p_format.h | 2 +-
> src/gallium/state_trackers/dri/common/dri_screen.c | 18 ++---
> src/gallium/state_trackers/egl/common/egl_g3d.c | 1 -
> src/gallium/state_trackers/glx/xlib/xm_api.c | 3 -
> src/gallium/state_trackers/wgl/stw_pixelformat.c | 1 -
> src/gallium/state_trackers/xa/xa_tracker.c | 3 -
> src/gallium/state_trackers/xorg/xorg_dri2.c | 3 -
> src/mesa/state_tracker/st_cb_fbo.c | 3 -
> src/mesa/state_tracker/st_format.c | 6 +-
> 19 files changed, 12 insertions(+), 193 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
> index 8d04b00..662cc59 100644
> --- a/src/gallium/auxiliary/util/u_format.csv
> +++ b/src/gallium/auxiliary/util/u_format.csv
> @@ -126,7 +126,6 @@ PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, r
> # Depth-stencil formats
> PIPE_FORMAT_S8_UINT , plain, 1, 1, up8 , , , , _x__, zs
> PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
> -PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
> PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
> PIPE_FORMAT_Z24_UNORM_S8_UINT , plain, 1, 1, un24, up8 , , , xy__, zs
> PIPE_FORMAT_S8_UINT_Z24_UNORM , plain, 1, 1, up8 , un24, , , yx__, zs
> diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
> index 84f16d5..2101293 100644
> --- a/src/gallium/auxiliary/util/u_format.h
> +++ b/src/gallium/auxiliary/util/u_format.h
> @@ -289,7 +289,7 @@ struct util_format_description
> unsigned i, unsigned j);
>
> /**
> - * Unpack pixels to Z32_UNORM.
> + * Unpack pixels to 32bit unorm.
> * Note: strides are in bytes.
> *
> * Only defined for depth formats.
> @@ -300,7 +300,7 @@ struct util_format_description
> unsigned width, unsigned height);
>
> /**
> - * Pack pixels from Z32_FLOAT.
> + * Pack pixels from 32bit unorm.
> * Note: strides are in bytes.
> *
> * Only defined for depth formats.
> diff --git a/src/gallium/auxiliary/util/u_format_tests.c b/src/gallium/auxiliary/util/u_format_tests.c
> index 64224cd..0e07dd1 100644
> --- a/src/gallium/auxiliary/util/u_format_tests.c
> +++ b/src/gallium/auxiliary/util/u_format_tests.c
> @@ -347,9 +347,6 @@ util_format_test_cases[] =
> {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
> {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
>
> - {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
> - {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
> -
> {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
> {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
>
> diff --git a/src/gallium/auxiliary/util/u_format_zs.c b/src/gallium/auxiliary/util/u_format_zs.c
> index ed45c52..f1a7b4c 100644
> --- a/src/gallium/auxiliary/util/u_format_zs.c
> +++ b/src/gallium/auxiliary/util/u_format_zs.c
> @@ -224,75 +224,6 @@ util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
> }
>
> void
> -util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
> - const uint8_t *src_row, unsigned src_stride,
> - unsigned width, unsigned height)
> -{
> - unsigned x, y;
> - for(y = 0; y < height; ++y) {
> - float *dst = dst_row;
> - const uint32_t *src = (const uint32_t *)src_row;
> - for(x = 0; x < width; ++x) {
> - uint32_t value = *src++;
> -#ifdef PIPE_ARCH_BIG_ENDIAN
> - value = util_bswap32(value);
> -#endif
> - *dst++ = z32_unorm_to_z32_float(value);
> - }
> - src_row += src_stride/sizeof(*src_row);
> - dst_row += dst_stride/sizeof(*dst_row);
> - }
> -}
> -
> -void
> -util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
> - const float *src_row, unsigned src_stride,
> - unsigned width, unsigned height)
> -{
> - unsigned x, y;
> - for(y = 0; y < height; ++y) {
> - const float *src = src_row;
> - uint32_t *dst = (uint32_t *)dst_row;
> - for(x = 0; x < width; ++x) {
> - uint32_t value;
> - value = z32_float_to_z32_unorm(*src++);
> -#ifdef PIPE_ARCH_BIG_ENDIAN
> - value = util_bswap32(value);
> -#endif
> - *dst++ = value;
> - }
> - dst_row += dst_stride/sizeof(*dst_row);
> - src_row += src_stride/sizeof(*src_row);
> - }
> -}
> -
> -void
> -util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
> - const uint8_t *src_row, unsigned src_stride,
> - unsigned width, unsigned height)
> -{
> - unsigned y;
> - for(y = 0; y < height; ++y) {
> - memcpy(dst_row, src_row, width * 4);
> - src_row += src_stride/sizeof(*src_row);
> - dst_row += dst_stride/sizeof(*dst_row);
> - }
> -}
> -
> -void
> -util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
> - const uint32_t *src_row, unsigned src_stride,
> - unsigned width, unsigned height)
> -{
> - unsigned y;
> - for(y = 0; y < height; ++y) {
> - memcpy(dst_row, src_row, width * 4);
> - src_row += src_stride/sizeof(*src_row);
> - dst_row += dst_stride/sizeof(*dst_row);
> - }
> -}
> -
> -void
> util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride,
> const uint8_t *src_row, unsigned src_stride,
> unsigned width, unsigned height)
> diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
> index 3625273..a6f1c95 100644
> --- a/src/gallium/auxiliary/util/u_pack_color.h
> +++ b/src/gallium/auxiliary/util/u_pack_color.h
> @@ -443,7 +443,6 @@ util_pack_mask_z(enum pipe_format format, uint32_t z)
> switch (format) {
> case PIPE_FORMAT_Z16_UNORM:
> return z & 0xffff;
> - case PIPE_FORMAT_Z32_UNORM:
> case PIPE_FORMAT_Z32_FLOAT:
> return z;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> @@ -529,11 +528,6 @@ util_pack_z(enum pipe_format format, double z)
> if (z == 1.0)
> return 0xffff;
> return (uint32_t) lrint(z * 0xffff);
> - case PIPE_FORMAT_Z32_UNORM:
> - /* special-case to avoid overflow */
> - if (z == 1.0)
> - return 0xffffffff;
> - return (uint32_t) llrint(z * 0xffffffff);
> case PIPE_FORMAT_Z32_FLOAT:
> fui.f = (float)z;
> return fui.ui;
> diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
> index fb80aec..3a1dfd8 100644
> --- a/src/gallium/auxiliary/util/u_tile.c
> +++ b/src/gallium/auxiliary/util/u_tile.c
> @@ -118,35 +118,6 @@ z16_get_tile_rgba(const ushort *src,
> }
>
>
> -
> -
> -/*** PIPE_FORMAT_Z32_UNORM ***/
> -
> -/**
> - * Return each Z value as four floats in [0,1].
> - */
> -static void
> -z32_get_tile_rgba(const unsigned *src,
> - unsigned w, unsigned h,
> - float *p,
> - unsigned dst_stride)
> -{
> - const double scale = 1.0 / (double) 0xffffffff;
> - 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] = (float) (*src++ * scale);
> - }
> - p += dst_stride;
> - }
> -}
> -
> -
> /*** PIPE_FORMAT_Z24_UNORM_S8_UINT ***/
>
> /**
> @@ -363,9 +334,6 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
> case PIPE_FORMAT_Z16_UNORM:
> z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
> - break;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> case PIPE_FORMAT_Z24X8_UNORM:
> s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
> @@ -497,9 +465,6 @@ pipe_put_tile_rgba_format(struct pipe_transfer *pt,
> case PIPE_FORMAT_Z16_UNORM:
> /*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - /*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
> - break;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> case PIPE_FORMAT_Z24X8_UNORM:
> /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
> @@ -601,17 +566,6 @@ pipe_get_tile_z(struct pipe_transfer *pt,
> 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;
> - }
> - }
> - break;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> case PIPE_FORMAT_Z24X8_UNORM:
> {
> @@ -722,16 +676,6 @@ pipe_put_tile_z(struct pipe_transfer *pt,
> return;
>
> switch (format) {
> - case PIPE_FORMAT_Z32_UNORM:
> - {
> - uint *pDest = (uint *) (map + y * pt->stride + x*4);
> - for (i = 0; i < h; i++) {
> - memcpy(pDest, ptrc, 4 * w);
> - pDest += pt->stride/4;
> - ptrc += srcStride;
> - }
> - }
> - break;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> {
> uint *pDest = (uint *) (map + y * pt->stride + x*4);
> diff --git a/src/gallium/drivers/ilo/ilo_format.c b/src/gallium/drivers/ilo/ilo_format.c
> index 40b5ffa..84d34b7 100644
> --- a/src/gallium/drivers/ilo/ilo_format.c
> +++ b/src/gallium/drivers/ilo/ilo_format.c
> @@ -359,7 +359,7 @@ ilo_translate_color_format(enum pipe_format format)
> [PIPE_FORMAT_UYVY] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
> [PIPE_FORMAT_YUYV] = BRW_SURFACEFORMAT_YCRCB_NORMAL,
> [PIPE_FORMAT_Z16_UNORM] = 0,
> - [PIPE_FORMAT_Z32_UNORM] = 0,
> + /* gap */
> [PIPE_FORMAT_Z32_FLOAT] = 0,
> [PIPE_FORMAT_Z24_UNORM_S8_UINT] = 0,
> [PIPE_FORMAT_S8_UINT_Z24_UNORM] = 0,
> diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
> index 67bc67c..97ea8a1 100644
> --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c
> +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
> @@ -70,13 +70,6 @@ get_depth_stencil_values( struct depth_data *data,
> data->bzzzz[j] = tile->data.depth16[y][x];
> }
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> - int x = quad->input.x0 % TILE_SIZE + (j & 1);
> - int y = quad->input.y0 % TILE_SIZE + (j >> 1);
> - data->bzzzz[j] = tile->data.depth32[y][x];
> - }
> - break;
> case PIPE_FORMAT_Z24X8_UNORM:
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> @@ -169,15 +162,6 @@ convert_quad_depth( struct depth_data *data,
> }
> }
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - {
> - double scale = (double) (uint) ~0UL;
> -
> - for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> - data->qzzzz[j] = (unsigned) (quad->output.depth[j] * scale);
> - }
> - }
> - break;
> case PIPE_FORMAT_Z24X8_UNORM:
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> {
> @@ -266,7 +250,6 @@ write_depth_stencil_values( struct depth_data *data,
> }
> break;
> case PIPE_FORMAT_Z24X8_UNORM:
> - case PIPE_FORMAT_Z32_UNORM:
> for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> int x = quad->input.x0 % TILE_SIZE + (j & 1);
> int y = quad->input.y0 % TILE_SIZE + (j >> 1);
> diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
> index 5a153a8..5817cc4 100644
> --- a/src/gallium/drivers/svga/svga_format.c
> +++ b/src/gallium/drivers/svga/svga_format.c
> @@ -103,9 +103,6 @@ svga_translate_format(struct svga_screen *ss,
> case PIPE_FORMAT_R16G16B16A16_FLOAT:
> return SVGA3D_ARGB_S10E5;
>
> - case PIPE_FORMAT_Z32_UNORM:
> - /* SVGA3D_Z_D32 is not yet unsupported */
> - /* fall-through */
> default:
> return SVGA3D_FORMAT_INVALID;
> }
> diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
> index f1c007b..46ae64a 100644
> --- a/src/gallium/drivers/svga/svga_pipe_misc.c
> +++ b/src/gallium/drivers/svga/svga_pipe_misc.c
> @@ -68,7 +68,6 @@ void svga_cleanup_framebuffer(struct svga_context *svga)
>
> #define DEPTH_BIAS_SCALE_FACTOR_D16 ((float)(1<<15))
> #define DEPTH_BIAS_SCALE_FACTOR_D24S8 ((float)(1<<23))
> -#define DEPTH_BIAS_SCALE_FACTOR_D32 ((float)(1<<31))
>
>
> static void svga_set_framebuffer_state(struct pipe_context *pipe,
> @@ -128,9 +127,6 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
> case PIPE_FORMAT_X8Z24_UNORM:
> svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D32;
> - break;
> case PIPE_FORMAT_Z32_FLOAT:
> svga->curr.depthscale = 1.0f / ((float)(1<<23));
> break;
> diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
> index b82f08f..e187725 100644
> --- a/src/gallium/include/pipe/p_format.h
> +++ b/src/gallium/include/pipe/p_format.h
> @@ -70,7 +70,7 @@ enum pipe_format {
> PIPE_FORMAT_UYVY = 14,
> PIPE_FORMAT_YUYV = 15,
> PIPE_FORMAT_Z16_UNORM = 16,
> - PIPE_FORMAT_Z32_UNORM = 17,
> + /* gap */
> PIPE_FORMAT_Z32_FLOAT = 18,
> PIPE_FORMAT_Z24_UNORM_S8_UINT = 19,
> PIPE_FORMAT_S8_UINT_Z24_UNORM = 20,
> diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
> index 92cac73..de1fd68 100644
> --- a/src/gallium/state_trackers/dri/common/dri_screen.c
> +++ b/src/gallium/state_trackers/dri/common/dri_screen.c
> @@ -95,7 +95,7 @@ dri_fill_in_modes(struct dri_screen *screen)
> unsigned msaa_samples_max;
> unsigned i;
> struct pipe_screen *p_screen = screen->base.screen;
> - boolean pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32;
> + boolean pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8;
>
> static const GLenum back_buffer_modes[] = {
> GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
> @@ -129,9 +129,6 @@ dri_fill_in_modes(struct dri_screen *screen)
> pf_z16 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z16_UNORM,
> PIPE_TEXTURE_2D, 0,
> PIPE_BIND_DEPTH_STENCIL);
> - pf_z32 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z32_UNORM,
> - PIPE_TEXTURE_2D, 0,
> - PIPE_BIND_DEPTH_STENCIL);
>
> if (pf_z16) {
> depth_bits_array[depth_buffer_factor] = 16;
> @@ -147,10 +144,6 @@ dri_fill_in_modes(struct dri_screen *screen)
> stencil_bits_array[depth_buffer_factor++] = 8;
> screen->sd_depth_bits_last = pf_s8z24;
> }
> - if (pf_z32) {
> - depth_bits_array[depth_buffer_factor] = 32;
> - stencil_bits_array[depth_buffer_factor++] = 0;
> - }
>
> assert(Elements(mesa_formats) == Elements(pipe_formats));
>
> @@ -271,17 +264,20 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
> break;
> case 24:
> if (mode->stencilBits == 0) {
> - stvis->depth_stencil_format = (screen->d_depth_bits_last) ?
> + stvis->depth_stencil_format = (screen->d_depth_bits_last) ?
> PIPE_FORMAT_Z24X8_UNORM:
> PIPE_FORMAT_X8Z24_UNORM;
> } else {
> - stvis->depth_stencil_format = (screen->sd_depth_bits_last) ?
> + stvis->depth_stencil_format = (screen->sd_depth_bits_last) ?
> PIPE_FORMAT_Z24_UNORM_S8_UINT:
> PIPE_FORMAT_S8_UINT_Z24_UNORM;
> }
> break;
> case 32:
> - stvis->depth_stencil_format = PIPE_FORMAT_Z32_UNORM;
> + /* not sure here what to do? */
> + stvis->depth_stencil_format = (screen->d_depth_bits_last) ?
> + PIPE_FORMAT_Z24X8_UNORM:
> + PIPE_FORMAT_X8Z24_UNORM;
> break;
> }
>
> diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
> index 7cc4e8f..97c43e1 100644
> --- a/src/gallium/state_trackers/egl/common/egl_g3d.c
> +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
> @@ -382,7 +382,6 @@ egl_g3d_fill_depth_stencil_formats(_EGLDisplay *dpy,
> struct pipe_screen *screen = gdpy->native->screen;
> const EGLint candidates[] = {
> 1, PIPE_FORMAT_Z16_UNORM,
> - 1, PIPE_FORMAT_Z32_UNORM,
> 2, PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_S8_UINT_Z24_UNORM,
> 2, PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM,
> 0
> diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
> index bb2dd8e..fd76420 100644
> --- a/src/gallium/state_trackers/glx/xlib/xm_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
> @@ -397,9 +397,6 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil)
> formats[count++] = PIPE_FORMAT_S8_UINT_Z24_UNORM;
> formats[count++] = PIPE_FORMAT_Z24_UNORM_S8_UINT;
> }
> - if (depth <= 32 && stencil == 0) {
> - formats[count++] = PIPE_FORMAT_Z32_UNORM;
> - }
>
> fmt = PIPE_FORMAT_NONE;
> for (i = 0; i < count; i++) {
> diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> index b74b71b..de3e1dc 100644
> --- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
> +++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
> @@ -93,7 +93,6 @@ stw_pf_color_extended[] = {
> static const struct stw_pf_depth_info
> stw_pf_depth_stencil[] = {
> /* pure depth */
> - { PIPE_FORMAT_Z32_UNORM, {32, 0} },
> { PIPE_FORMAT_X8Z24_UNORM, {24, 0} },
> { PIPE_FORMAT_Z24X8_UNORM, {24, 0} },
> { PIPE_FORMAT_Z16_UNORM, {16, 0} },
> diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c
> index cda6501..6936ca9 100644
> --- a/src/gallium/state_trackers/xa/xa_tracker.c
> +++ b/src/gallium/state_trackers/xa/xa_tracker.c
> @@ -108,9 +108,6 @@ xa_get_pipe_format(enum xa_formats xa_format)
> case xa_format_z16:
> fdesc.format = PIPE_FORMAT_Z16_UNORM;
> break;
> - case xa_format_z32:
> - fdesc.format = PIPE_FORMAT_Z32_UNORM;
> - break;
> case xa_format_x8z24:
> fdesc.format = PIPE_FORMAT_Z24X8_UNORM;
> break;
> diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
> index fb50ef8..d4c1102 100644
> --- a/src/gallium/state_trackers/xorg/xorg_dri2.c
> +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
> @@ -114,9 +114,6 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
> case 16:
> template.format = PIPE_FORMAT_Z16_UNORM;
> break;
> - case 32:
> - template.format = PIPE_FORMAT_Z32_UNORM;
> - break;
> default:
> template.format = ms->ds_depth_bits_last ?
> PIPE_FORMAT_Z24X8_UNORM : PIPE_FORMAT_X8Z24_UNORM;
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index 2089482..b509a10 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -319,9 +319,6 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
> case PIPE_FORMAT_Z16_UNORM:
> strb->Base.InternalFormat = GL_DEPTH_COMPONENT16;
> break;
> - case PIPE_FORMAT_Z32_UNORM:
> - strb->Base.InternalFormat = GL_DEPTH_COMPONENT32;
> - break;
> case PIPE_FORMAT_Z24_UNORM_S8_UINT:
> case PIPE_FORMAT_S8_UINT_Z24_UNORM:
> strb->Base.InternalFormat = GL_DEPTH24_STENCIL8_EXT;
> diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
> index 33c2ca6..3eea59e 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -102,8 +102,6 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
> return PIPE_FORMAT_I16_UNORM;
> case MESA_FORMAT_Z16:
> return PIPE_FORMAT_Z16_UNORM;
> - case MESA_FORMAT_Z32:
> - return PIPE_FORMAT_Z32_UNORM;
> case MESA_FORMAT_Z24_S8:
> return PIPE_FORMAT_S8_UINT_Z24_UNORM;
> case MESA_FORMAT_S8_Z24:
> @@ -455,8 +453,6 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
>
> case PIPE_FORMAT_Z16_UNORM:
> return MESA_FORMAT_Z16;
> - case PIPE_FORMAT_Z32_UNORM:
> - return MESA_FORMAT_Z32;
> case PIPE_FORMAT_S8_UINT_Z24_UNORM:
> return MESA_FORMAT_Z24_S8;
> case PIPE_FORMAT_X8Z24_UNORM:
> @@ -967,7 +963,7 @@ static const struct format_mapping format_map[] = {
> },
> {
> { GL_DEPTH_COMPONENT32, 0 },
> - { PIPE_FORMAT_Z32_UNORM, DEFAULT_DEPTH_FORMATS }
> + { DEFAULT_DEPTH_FORMATS }
> },
> {
> { GL_DEPTH_COMPONENT, 0 },
> --
> 1.7.9.5
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list