<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 14, 2018 at 8:35 AM, Daniel Stone <span dir="ltr"><<a href="mailto:daniel@fooishbar.org" target="_blank">daniel@fooishbar.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 14 February 2018 at 16:21, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> On Wed, Feb 14, 2018 at 4:13 AM, Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br>
</span><span class="gmail-">>> Suggested fixup: <a href="https://hastebin.com/zaheyoriwa" rel="noreferrer" target="_blank">https://hastebin.com/<wbr>zaheyoriwa</a><br>
>><br>
>> This makes sure we only try to allocate with modifiers when _both_<br>
>> winsys and driver support it.<br>
><br>
> Ok, we clearly have different philosophies here so we should get that<br>
> sorted. My philosophy is that the winsys code will look at the<br>
> wsi_device::supports_modifiers flag and not ask for modifiers if it's false.<br>
> You seem to think that the winsys code should just go ahead and ask for<br>
> modifiers all the time and we will try to deal with it in wsi_create_native.<br>
> Thoughts? Arguments? Strong opinions?<br>
><br>
> If we keep my philosophy, we should add asserts to better document and<br>
> enforce it.<br></span></blockquote><div><br></div><div>I've added the following to the top of wsi_create_native_image:<br><br>+ /* If we don't support modifiers, the winsys code shouldn't be asking for<br>+ * an image with modifiers.<br>+ */<br>+ assert(wsi->supports_modifiers || num_modifier_lists == 0);<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
</span>Yeah, it was mostly based on missing the wsi->has_modifiers check in<br>
the Wayland</blockquote><div><br></div><div>Wayland definitely has the check. I'll double-check on X11.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> code, and it being totally absent in the X11/DRI3 code<br>
(trivial to add). So my philosophy was mostly about avoiding asserts,<br>
rather than strong feelings about who should do the filtering.<br>
<br>
I'm happy to stick with how you have it, plus asserts. Thanks for the<br>
explanation!<br>
<br>
Cheers,<br>
Daniel<br>
</blockquote></div><br></div></div>