<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Am 01.11.2017 7:06 nachm. schrieb "Wladimir J. van der Laan" <<a href="mailto:laanwj@gmail.com" target="_blank">laanwj@gmail.com</a>>:<br type="attribution"><blockquote class="m_2046063863649384186m_4501523832958435206quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_2046063863649384186m_4501523832958435206quoted-text">On Wed, Nov 01, 2017 at 06:38:21PM +0100, Christian Gmeiner wrote:<br>
<br>
> I would love to see a new format helper (util_format_is_astc(..) and not<br>
> even start thinking about adding a new format bit (ASTC_FORMAT).<br>
<br>
</div>These formats are in a completely different space from the others, in the<br>
hardware (programmed through a different register), so IMO it makes sense to<br>
add a new format bit for it, just like for EXT_FORMAT.<br>
<br>
Relying on mesa's judgement on whether something is astc seems brittle.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Sorry I do not share this option. Did you had a look at <a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/auxiliary/util/u_format.csv" target="_blank">https://cgit.freedesktop.<wbr>org/mesa/mesa/tree/src/<wbr>gallium/auxiliary/util/u_<wbr>format.csv</a> ?</div><div dir="auto"><br></div><div dir="auto">All astc formats are marked as those and why should we not trust mesa here? Such helper could look like: <a href="https://hastebin.com/jelisigife.m" target="_blank">https://hastebin.com/<wbr>jelisigife.m</a></div><div dir="auto"><br></div><div dir="auto">Do we need ctx->specs.tex_astc at all? We could simply do it like this in etnaviv_screen.c:</div><div dir="auto"><br></div><div dir="auto"><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13.3333px;background-color:rgb(255,255,255)"><code>if (util_format_is_astc(format))
supported = </code>VIV_FEATURE(screen, chipMinorFeatures4, TEXTURE_ASTC);</pre></div><div dir="auto"><br></div><div dir="auto">I am still on travel but will share you tomorrow evening how I think this should look like.</div><div dir="auto"><br></div><div dir="auto">Greets</div><div dir="auto">--</div><div dir="auto">Christian </div><div dir="auto"><div class="gmail_extra"><br></div></div></div>