Mesa (master): util/u_format: take normalized flag in consideration in util_format_is_rgba8_variant
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Tue Nov 5 14:07:02 UTC 2013
Module: Mesa
Branch: master
Commit: c883ee449882a580088deac7b4706f502ef0f33c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c883ee449882a580088deac7b4706f502ef0f33c
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Oct 25 12:39:42 2013 +0100
util/u_format: take normalized flag in consideration in util_format_is_rgba8_variant
Just happened to notice it was missing while looking at it.
---
src/gallium/auxiliary/util/u_format.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index dc777c3..369c399 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -696,6 +696,9 @@ util_format_is_rgba8_variant(const struct util_format_description *desc)
if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED &&
desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID)
return FALSE;
+ if(desc->channel[chan].type == UTIL_FORMAT_TYPE_UNSIGNED &&
+ !desc->channel[chan].normalized)
+ return FALSE;
if(desc->channel[chan].size != 8)
return FALSE;
}
More information about the mesa-commit
mailing list