[Mesa-dev] [PATCH v5 2/2] i965: Queue the buffer with a sync fence for Android OS

Emil Velikov emil.l.velikov at gmail.com
Fri Aug 4 13:02:29 UTC 2017


On 4 August 2017 at 04:21, Marathe, Yogesh <yogesh.marathe at intel.com> wrote:

>> > The check looks like below now, this is in dri2_surf_update_fence_fd() before
>> create_fence_fd is called.
>> >
>> > if (dri2_surf->enable_out_fence && dri2_dpy->fence) {
>> >        if(__DRI_FENCE_CAP_NATIVE_FD |
>> > dri2_dpy->fence->get_capabilities(dri2_dpy->dri_screen)) {
>>
>> This doesn't make any sense, because non-zero OR whatever is always true. Did
>> you by any chance meant to use AND instead? Also please just extend the
>> condition of the first if, instead of nesting another under it for no reason.
>>
>
> Right. It must be '&', thanks for pointing out.
>
> On the nesting, I want to check dri2_dpy->fence is valid first before dri2_dpy->fence->(anything())
> can be called, so I believe that nesting can still be there. Rafael had that review comment.
> Do you still want to combine conditions in a single 'if'?
>
In my example (just a second ago) I've kept the conditionals separate
since they're quite large.
Squashing them in a single if () block is fine with me.

-Emil


More information about the mesa-dev mailing list