[Mesa-dev] [PATCH] gallivm: fix srgb format fetch
Brian Paul
brian.e.paul at gmail.com
Sat Dec 1 17:21:54 PST 2012
On Sat, Dec 1, 2012 at 9:04 AM, <sroland at vmware.com> wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> we need to rely on util code for fetching those, just like before
> 9f06061d50f90bf425a5337cea1b0adb94a46d25.
> Fixes bugs 57699 and 57756.
> ---
> src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
> index 0b54ba4..c7fdb6e 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);
> }
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list