[Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports
Daniel Stone
daniel at fooishbar.org
Wed Aug 9 10:55:16 UTC 2017
On 8 August 2017 at 09:48, Tapani Pälli <tapani.palli at intel.com> wrote:
> On 08/08/2017 10:37 AM, Philipp Zabel wrote:
>> On Tue, 2017-08-08 at 07:29 +0300, Tapani Pälli wrote:
>>>> Since this increments plane_n, Should a check be added that the
>>>> corresponding DMABufPlanFds[i] is present?
>>>
>>> Check for the fd is right above this check.
>>
>>
>> I see this right above:
>>
>> if (attrs->DMABufPlaneFds[i].IsPresent ||
>> attrs->DMABufPlaneOffsets[i].IsPresent ||
>> attrs->DMABufPlanePitches[i].IsPresent ||
>> attrs->DMABufPlaneModifiersLo[i].IsPresent ||
>> attrs->DMABufPlaneModifiersHi[i].IsPresent) {
>>
>> If modifiers are present, this is always true, regardless of whether the
>> fd is present.
>>
>> The loop that checks for fd presence even before that only loops up to
>> the number of planes determined by the non-modified fourcc.
>
> Ah that is correct, my bad. It would be possible to swim through with having
> modifiers and not fd present.
Thanks for the review both - v2 sent which makes it a bit more neat
and also fixes the bug.
Cheers,
Daniel
More information about the mesa-dev
mailing list