Mesa (master): gallium/format: add X32_S8X24_USCALED format.

Dave Airlie airlied at kemper.freedesktop.org
Tue Oct 12 23:39:38 UTC 2010


Module: Mesa
Branch: master
Commit: 67e71429f13aedf1cc8bf444708a7aa65223ac0a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=67e71429f13aedf1cc8bf444708a7aa65223ac0a

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Oct  7 16:14:59 2010 +1000

gallium/format: add X32_S8X24_USCALED format.

Has similiar use cases to the S8X24 and X24S8 formats.

---

 src/gallium/auxiliary/util/u_format.csv  |    1 +
 src/gallium/auxiliary/util/u_format_zs.c |   21 +++++++++++++++++++++
 src/gallium/auxiliary/util/u_format_zs.h |    5 +++++
 src/gallium/include/pipe/p_format.h      |    1 +
 4 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 5c0f8db..1fbd838 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -114,6 +114,7 @@ PIPE_FORMAT_S8X24_USCALED           , plain, 1, 1, u8  , x24 ,     ,     , _x__,
 PIPE_FORMAT_Z24X8_UNORM             , plain, 1, 1, un24, x8  ,     ,     , x___, zs
 PIPE_FORMAT_X8Z24_UNORM             , plain, 1, 1, x8  , un24,     ,     , y___, zs
 PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED , plain, 1, 1, f32,  u8  , x24 ,     , xy__, zs
+PIPE_FORMAT_X32_S8X24_USCALED       , plain, 1, 1, x32,  u8  , x24 ,     , _y__, zs
 
 # YUV formats
 # http://www.fourcc.org/yuv.php#UYVY
diff --git a/src/gallium/auxiliary/util/u_format_zs.c b/src/gallium/auxiliary/util/u_format_zs.c
index fdadcec..80081e2 100644
--- a/src/gallium/auxiliary/util/u_format_zs.c
+++ b/src/gallium/auxiliary/util/u_format_zs.c
@@ -950,3 +950,24 @@ util_format_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
 						      src_row, src_stride,
 						      width, height);
 }
+
+void
+util_format_x32_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+						const uint8_t *src_row, unsigned src_stride,
+						unsigned width, unsigned height)
+{
+   util_format_z32_float_s8x24_uscaled_unpack_s_8uscaled(dst_row, dst_stride,
+							 src_row, src_stride,
+							 width, height);
+
+}
+
+void
+util_format_x32_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+					      const uint8_t *src_row, unsigned src_stride,
+					      unsigned width, unsigned height)
+{
+   util_format_z32_float_s8x24_uscaled_pack_s_8uscaled(dst_row, dst_stride,
+                                                       src_row, src_stride,
+						       width, height);
+}
diff --git a/src/gallium/auxiliary/util/u_format_zs.h b/src/gallium/auxiliary/util/u_format_zs.h
index d412ca4..1604cc3 100644
--- a/src/gallium/auxiliary/util/u_format_zs.h
+++ b/src/gallium/auxiliary/util/u_format_zs.h
@@ -204,4 +204,9 @@ util_format_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_strid
 void
 util_format_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
 
+void
+util_format_x32_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_x32_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
 #endif /* U_FORMAT_ZS_H_ */
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 9978e52..22cc7aa 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -189,6 +189,7 @@ enum pipe_format {
    /* some stencil samplers formats */
    PIPE_FORMAT_X24S8_USCALED           = 136,
    PIPE_FORMAT_S8X24_USCALED           = 137,
+   PIPE_FORMAT_X32_S8X24_USCALED       = 138,
    PIPE_FORMAT_COUNT
 };
 




More information about the mesa-commit mailing list