[Mesa-dev] [PATCH] gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats
Marek Olšák
maraeo at gmail.com
Wed Jan 22 03:53:21 PST 2014
There is only one caller, which is fixed by this patch.
Marek
On Wed, Jan 22, 2014 at 12:52 AM, Brian Paul <brianp at vmware.com> wrote:
> On 01/21/2014 02:21 PM, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> This fixes a serious regression introduced
>> in 4e549ddb500cf677b6fa16d9ebdfa67cc23da097.
>>
>> Cc: 9.2 10.0 <mesa-stable at lists.freedesktop.org>
>> ---
>> src/gallium/auxiliary/util/u_format.h | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/src/gallium/auxiliary/util/u_format.h
>> b/src/gallium/auxiliary/util/u_format.h
>> index 0fbaf4c..5f86e2d 100644
>> --- a/src/gallium/auxiliary/util/u_format.h
>> +++ b/src/gallium/auxiliary/util/u_format.h
>> @@ -872,6 +872,9 @@ util_format_get_component_bits(enum pipe_format
>> format,
>> static INLINE enum pipe_format
>> util_format_srgb(enum pipe_format format)
>> {
>> + if (util_format_is_srgb(format))
>> + return format;
>> +
>> switch (format) {
>> case PIPE_FORMAT_L8_UNORM:
>> return PIPE_FORMAT_L8_SRGB;
>>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> This looks fine for fixing things but longer-term, maybe we should change
> util_format_srgb() to return the format unchanged in the default case, as we
> do for util_format_linear().
>
> I don't know if any callers depend on the default->PIPE_FORMAT_NONE behavior
> now.
>
> -Brian
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list