diff options
author | marha <marha@users.sourceforge.net> | 2013-11-08 11:09:17 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-08 11:09:17 +0100 |
commit | 401eb04e4dfb179291befb19d74e2e3148c4e268 (patch) | |
tree | bb9056b67a7bdf37cba96fecc69ce81b1809fb03 /mesalib/src/gallium/auxiliary/util/u_format.c | |
parent | f7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 (diff) | |
download | vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.gz vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.bz2 vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.zip |
libxtrans libxcb xcb-proto mesa git update 8 nov 2013
libxcb commit e8663a935890ff366f49e356211049dfd0d9756a
libxcb/xcb-proto commit 29beba6bf02bda86a5b163ace63e1d0a4d3eee5b
libxtrans commit 0153d1670e4a1883e1bb6dd971435d6268eac5ba
mesa commit 035cce83f7b3d9a037c9e7cc17a212d6cf7e927f
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_format.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c index 9ef3bb53f..6b602bf32 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.c +++ b/mesalib/src/gallium/auxiliary/util/u_format.c @@ -215,9 +215,8 @@ util_format_is_supported(enum pipe_format format, unsigned bind) * default MRD will be 1.0 / ((1 << 24) - 1). */ double -util_get_depth_format_mrd(enum pipe_format format) +util_get_depth_format_mrd(const struct util_format_description *desc) { - struct util_format_description *format_desc; /* * Depth buffer formats without a depth component OR scenarios * without a bound depth buffer default to D24. @@ -225,23 +224,20 @@ util_get_depth_format_mrd(enum pipe_format format) double mrd = 1.0 / ((1 << 24) - 1); unsigned depth_channel; - format_desc = (struct util_format_description *) - util_format_description(format); - - assert(format_desc); + assert(desc); /* * Some depth formats do not store the depth component in the first * channel, detect the format and adjust the depth channel. Get the * swizzled depth component channel. */ - depth_channel = format_desc->swizzle[0]; + depth_channel = desc->swizzle[0]; - if (format_desc->channel[depth_channel].type == UTIL_FORMAT_TYPE_UNSIGNED && - format_desc->channel[depth_channel].normalized) { + if (desc->channel[depth_channel].type == UTIL_FORMAT_TYPE_UNSIGNED && + desc->channel[depth_channel].normalized) { int depth_bits; - depth_bits = format_desc->channel[depth_channel].size; + depth_bits = desc->channel[depth_channel].size; mrd = 1.0 / ((1ULL << depth_bits) - 1); } |