On 4 August 2017 at 04:21, Marathe, Yogesh <yogesh.mara...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev