gallivm: fix srgb format fetch

we need to rely on util code for fetching those, just like before
9f06061d50.
Fixes bugs 57699 and 57756.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
Roland Scheidegger 2012-12-01 17:04:54 +01:00 committed by José Fonseca
parent 6a2f2300a8
commit 041966801e
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}