<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Unify the format conversion code"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84566#c42">Comment # 42</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Unify the format conversion code"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84566">bug 84566</a>
from <span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span></b>
<pre>(In reply to Iago Toral from <a href="show_bug.cgi?id=84566#c40">comment #40</a>)
<span class="quote">> Jason, I think we may want to be a bit more conservative with the
> pack/unpack fast paths when we consider the internal base format.
>
> Right now, if the src or dst formats are RGBA we will try the pack/unpack
> fast paths. However, these paths do not consider the internal base format
> and we can run into cases where simply packing or unpacking is not enough.
>
> Consider this example: the client executes a texture upload of RGBA data and
> selects a Luminance format for the texture. The driver does not support the
> luminance format, so decides to use BGRA instead. Since the source format is
> RGBA, we will directly pack to BGRA, but since the internal base format is
> luminance, that won't match the semantics we expect (luminance requires to
> copy R on all components).
>
> I could try to add conditions to protect these paths in situations like
> this. For example, in this particular case, I could check if the base format
> of the destination matches the base internal format provided by the client,
> and if they don't and the internal base format is luminance or intensity,
> then avoid the fast path. However, I think this might hit other formats too,
> since the problem, in general, is that pack/unpack fast paths do not
> consider that the dst format and the dst base internal format might be
> different and that might involve more than a simples pack or unpack to dst,
> so I am thinking that maybe we want to simply avoid the pack/unpack paths
> completely when the dst format is not the same as the dst base internal
> format.
>
> What do you think?</span >
That seems reasonable. We can add code to enable the fast path in the special
cases where it makes sense later. Just disabling it unless we're sure it works
seems like the right thing to do.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>