On Wed, Feb 14, 2018 at 8:35 AM, Daniel Stone <dan...@fooishbar.org> wrote:

> On 14 February 2018 at 16:21, Jason Ekstrand <ja...@jlekstrand.net> wrote:
> > On Wed, Feb 14, 2018 at 4:13 AM, Daniel Stone <dan...@fooishbar.org>
> wrote:
> >> Suggested fixup: https://hastebin.com/zaheyoriwa
> >>
> >> This makes sure we only try to allocate with modifiers when _both_
> >> winsys and driver support it.
> >
> > Ok, we clearly have different philosophies here so we should get that
> > sorted.  My philosophy is that the winsys code will look at the
> > wsi_device::supports_modifiers flag and not ask for modifiers if it's
> false.
> > You seem to think that the winsys code should just go ahead and ask for
> > modifiers all the time and we will try to deal with it in
> wsi_create_native.
> > Thoughts?  Arguments?  Strong opinions?
> >
> > If we keep my philosophy, we should add asserts to better document and
> > enforce it.
>

I've added the following to the top of wsi_create_native_image:

+   /* If we don't support modifiers, the winsys code shouldn't be asking
for
+    * an image with modifiers.
+    */
+   assert(wsi->supports_modifiers || num_modifier_lists == 0);


> Yeah, it was mostly based on missing the wsi->has_modifiers check in
> the Wayland


Wayland definitely has the check.  I'll double-check on X11.


> code, and it being totally absent in the X11/DRI3 code
> (trivial to add). So my philosophy was mostly about avoiding asserts,
> rather than strong feelings about who should do the filtering.
>
> I'm happy to stick with how you have it, plus asserts. Thanks for the
> explanation!
>
> Cheers,
> Daniel
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to