aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_format.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-29 07:56:51 +0100
committermarha <marha@users.sourceforge.net>2012-11-29 07:56:51 +0100
commitd2d73da59e64acdc4718e4e6790a69d967bee875 (patch)
tree5c0148abbbb1473bb80ddc7da286beae9c1f2c3d /mesalib/src/gallium/auxiliary/util/u_format.c
parent38eb7612c4b39dd69df4baf4450ba512e888effa (diff)
downloadvcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.gz
vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.bz2
vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.zip
fontconfig xserver mesa git update 29 nov 2012
xserver: 1712a45422a63f11b2146541279616fcfda09ec6 fontconfig: faea1cac85ac3b0fd6a983e1c0adeb68e115e06c mesa: c1023608002c985b9d72edc64732cd666de2a206
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c
index f572a612e..ddce95601 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format.c
@@ -147,9 +147,12 @@ util_format_is_array(const struct util_format_description *desc)
}
for (chan = 0; chan < desc->nr_channels; ++chan) {
- if (desc->swizzle[chan] != chan)
+ if (desc->channel[chan].size != desc->channel[0].size)
return FALSE;
+ if (desc->channel[chan].type == UTIL_FORMAT_TYPE_VOID && (chan + 1) == desc->nr_channels)
+ continue;
+
if (desc->channel[chan].type != desc->channel[0].type)
return FALSE;
@@ -158,9 +161,16 @@ util_format_is_array(const struct util_format_description *desc)
if (desc->channel[chan].pure_integer != desc->channel[0].pure_integer)
return FALSE;
+ }
- if (desc->channel[chan].size != desc->channel[0].size)
+ if (desc->nr_channels == 4) {
+ if (desc->swizzle[3] < 3)
return FALSE;
+ } else {
+ for (chan = 0; chan < desc->nr_channels; ++chan) {
+ if (desc->swizzle[chan] != chan)
+ return FALSE;
+ }
}
return TRUE;