On 24 July 2017 at 12:22, Daniel Stone <dan...@fooishbar.org> wrote: > Hi Emil, > > On 24 July 2017 at 12:18, Emil Velikov <emil.l.veli...@gmail.com> wrote: >> On 21 July 2017 at 14:34, Daniel Stone <dani...@collabora.com> wrote: >>> @@ -370,6 +370,9 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) >>> return -1; >>> } >>> >>> + if (num_modifiers == 0) >>> + modifiers = NULL; >>> + >> AFAICT this hunk is not needed - modifiers is accessed only when >> num_modifiers is non-zero. > > It's divergent inside Gallium, where resource_create_with_modifiers > will be called rather than resource_create if modifiers != NULL. > Excuse my ignorance, I must be having a really stupid moment. What does Gallium has to do here?
Having a skim trough gallium - there's two ways we can get into resource_create_with_modifiers. - createImage - dri2_create_image explicitly passes zero to both storage and count - createImageWithModifiers - cannot be called since num_modifiers being zero Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev