summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2012-12-01 17:04:54 +0100
committerJosé Fonseca <[email protected]>2012-12-03 14:10:36 +0000
commit041966801ec87e3bf32913e43d6882eca9434695 (patch)
tree78ae7b9288828db0a05d22641342bc6ba4da7e85
parent6a2f2300a8f9f3b007350546d6aba468d04f4430 (diff)
gallivm: fix srgb format fetch
we need to rely on util code for fetching those, just like before 9f06061d50f90bf425a5337cea1b0adb94a46d25. Fixes bugs 57699 and 57756. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index 0b54ba4c5f5..c7fdb6e9d95 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -481,7 +481,8 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
}
/* If all channels are of same type and we are not using half-floats */
- if (format_desc->is_array) {
+ if (format_desc->is_array &&
+ format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB) {
assert(!format_desc->is_mixed);
return lp_build_fetch_rgba_aos_array(gallivm, format_desc, type, base_ptr, offset);
}