[Mesa-dev] [Bug 84566] Unify the format conversion code

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 6 12:43:44 PDT 2014


--- Comment #4 from Jason Ekstrand <jason at jlekstrand.net> ---
(In reply to Iago Toral from comment #3)
> (...)
> As far as I can see, functions in textstore do not receive a  mesa_format
> for their src argument, instead they receive the GL format and data type, so
> in order to use the master function here we need to map this combination to
> a mesa_format or mesa_array_format first. It does not look like this
> conversion is available anywhere though, so I think we need to create a
> function that maps (GLformat, GLDataType)-> mesa_format. Something similar
> to what 
> _mesa_format_to_type_and_comps does, but the other way around. Jason, does
> this make sense to you?

Yes, that is more or less what I was intending.  It shouldn't be hard to write
a function that takes a GL format and type and kicks out a mesa_format or
mesa_array_format.  For most things it will be an array format.  For other
things like GL_RGBA with GL_UNSIGNED_INT_8_8_8_8_REV or
GL_UNSIGNED_INT_5_5_5_1_REV, you would kick out a mesa_format.  There aren't
many of these, so it should be a simple switch statement.

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141006/4ca495c1/attachment.html>

More information about the mesa-dev mailing list