<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 13, 2017 at 11:53 AM, Kristian H. Kristensen <span dir="ltr"><<a href="mailto:krh@bitplanet.net" target="_blank">krh@bitplanet.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> writes:<br>
<br>
> Hey Kristian,<br>
><br>
> On 13 March 2017 at 17:31, Kristian H. Kristensen <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>> wrote:<br>
>> Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> writes:<br>
>>> I was talking to Daniel today and I think we also need another some sort of<br>
>>> GL or GBM api that gives you the modifiers supported for<br>
>>> rendering/texturing.  One option would be a gbm_get_modifiers_for_use()<br>
>>> entrypoint that takes a usage and gives you a set of modifiers that's<br>
>>> guaranteed to work for that usage.  For scanout, it would return LINEAR, X,<br>
>>> and Y on SKL+ and LINEAR and X on BDW-; it wouldn't return CCS because that<br>
>>> only works on a limited number of planes.  I say this now because we may<br>
>>> want to do that with the same DRI version bump as the rest of it.<br>
>><br>
>> Are you aware of<br>
>><br>
>> <a href="https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt" rel="noreferrer" target="_blank">https://www.khronos.org/<wbr>registry/EGL/extensions/EXT/<wbr>EGL_EXT_image_dma_buf_import_<wbr>modifiers.txt</a><br>
>><br>
>> If you talked to Daniel, he probably brought it up - what's missing?<br></span></blockquote><div><br></div><div>Hey, Look!  An API!  That appears to mostly do what we want.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> I guess it depends on how much asymmetry there is between texture and<br>
> render formats ... if there isn't much, then we could focus on landing<br>
> Varad's work and use that as a jumping-off point. I was under the<br>
> impression that there was a pretty big difference for some hardware,<br>
> though I guess the GBM implementation would still rank by optimality<br>
> when allocating ...<br>
<br>
</span>Right, but if it's more complicated than what<br>
EGL_EXT_image_dma_buf_import_<wbr>modifiers exposes, do really we want to<br>
that logic into gbm?<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div>The GBM API I was thinking of was basically a GBM version of that.  The primary addition to the above extension being some set of usage flags.  There shouldn't be a huge asymmetry between texture and render.  What concerns me more is if you tie some other API into EGL that does media or something (OpenMAX?) you may run into issues where something works for render but not for media decode.  If we don't care about anything other than 3D tying into EGL, then the above API should be ok.<br></div></div></div>