Mesa (master): gallium: Support PIPE_FORMAT_R10G10B10A2_UINT.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Aug 22 11:14:51 UTC 2013


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Aug 21 16:49:57 2013 +0100

gallium: Support PIPE_FORMAT_R10G10B10A2_UINT.

Same as PIPE_FORMAT_B10G10R10A2_UINT but without the swizzling.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |    1 +
 src/gallium/auxiliary/util/u_format.csv           |    1 +
 src/gallium/include/pipe/p_format.h               |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 34ab414..38a0eae 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -1466,6 +1466,7 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld,
       /* mixed plain formats (or different pure size) */
       switch (format_desc->format) {
       case PIPE_FORMAT_B10G10R10A2_UINT:
+      case PIPE_FORMAT_R10G10B10A2_UINT:
       {
          unsigned max10 = (1 << 10) - 1;
          max_clamp = lp_build_const_aos(gallivm, vec4_type, max10, max10,
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index f3925bb..8d04b00 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -372,3 +372,4 @@ PIPE_FORMAT_R16A16_UINT             , plain, 1, 1, up16 , up16 ,     ,     , x00
 PIPE_FORMAT_R16A16_SINT             , plain, 1, 1, sp16 , sp16 ,     ,     , x00y, rgb
 PIPE_FORMAT_R32A32_UINT             , plain, 1, 1, up32 , up32 ,     ,     , x00y, rgb
 PIPE_FORMAT_R32A32_SINT             , plain, 1, 1, sp32 , sp32 ,     ,     , x00y, rgb
+PIPE_FORMAT_R10G10B10A2_UINT        , plain, 1, 1, up10 , up10 , up10, up2 , xyzw, rgb
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index f181621..b82f08f 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -340,6 +340,7 @@ enum pipe_format {
    PIPE_FORMAT_R16A16_SINT             = 250,
    PIPE_FORMAT_R32A32_UINT             = 251,
    PIPE_FORMAT_R32A32_SINT             = 252,
+   PIPE_FORMAT_R10G10B10A2_UINT        = 253,
 
    PIPE_FORMAT_COUNT
 };




More information about the mesa-commit mailing list