[Mesa-dev] [PATCH 12/29] mesa: Fix RGBA8888_UINT direct unpack path in _mesa_format_convert.
Iago Toral Quiroga
itoral at igalia.com
Tue Nov 18 01:23:53 PST 2014
A direct unpack to this format from a signed format won't clamp so we should
not resolve converts of this kind via the unpack fast path. These scenarios
will be handled properly by mesa_swizzle_and_convert path.
---
src/mesa/main/format_utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
index 34c90d9..97c125c 100644
--- a/src/mesa/main/format_utils.c
+++ b/src/mesa/main/format_utils.c
@@ -367,7 +367,8 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,
}
return;
} else if (dst_array_format.as_uint == RGBA8888_UINT.as_uint &&
- _mesa_is_format_integer_color(src_format)) {
+ _mesa_is_format_integer_color(src_format) &&
+ _mesa_is_format_unsigned(src_format)) {
for (row = 0; row < height; ++row) {
_mesa_unpack_uint_rgba_row(src_format, width,
src, (uint32_t (*)[4])dst);
--
1.9.1
More information about the mesa-dev
mailing list