[Mesa-dev] [PATCH V2] radeonsi/uvd: fix planar formats broken since f70f6baaa3bb0f8b280ac2eaea69bb

Marek Olšák maraeo at gmail.com
Sat Sep 30 15:53:03 UTC 2017


On Sat, Sep 30, 2017 at 5:47 PM, Christian König
<christian.koenig at amd.com> wrote:
> Am 30.09.2017 um 12:57 schrieb Benedikt Schemmer:
>>>
>>> It should be handled as an error if resource_formats[0] is
>>> PIPE_FORMAT_NONE.
>>>
>>> Better write this as:
>>>
>>> if (resource_formats[i] == PIPE_FORMAT_NONE) {
>>>      if (i == 0)
>>>          gotot error;
>>>      continue;
>>> }
>>> ...
>>>
>> I dont think it can be zero.
>> In the beginning of vl_video_buffer.c formats and return values are
>> defined and resource_formats[0] is guranteed to not
>> be PIPE_FORMAT_NONE. The only other return value is null which caught
>> immediately after requesting resource_formats
>> (line 59, in si_uvd.c).
>> So maybe
>> assert(resource_formats[0] == PIPE_FORMAT_NONE)
>> for debugging purposes?

Did you mean:
assert(resource_formats[0] != PIPE_FORMAT_NONE) ?

Marek


More information about the mesa-dev mailing list