[Mesa-dev] [PATCH 16/20] mesa/formats: add new mesa formats and their pack/unpack functions.

Samuel Iglesias Gonsálvez siglesias at igalia.com
Sun Nov 23 23:30:36 PST 2014


On Thu, 2014-11-20 at 13:19 +0100, Samuel Iglesias Gonsálvez wrote:
[...]
> >         +   /* Other formats */
> >         +   MESA_FORMAT_R3G3B2_UNORM,
> >            /* BBGG GRRR */
> >         +   MESA_FORMAT_A4B4G4R4_UNORM,                       /* RRRR
> >         GGGG BBBB AAAA */
> >         +   MESA_FORMAT_R4G4B4A4_UNORM,                       /* AAAA
> >         BBBB GGGG RRRR */
> >         +   MESA_FORMAT_R1G5B5A5_UNORM,                       /* AAAA
> >         ABBB BBGG GGGR */
> >         +   MESA_FORMAT_R5G5B5A1_UNORM,                       /* ABBB
> >         BBGG GGGR RRRR */
> >         +   MESA_FORMAT_A5B5G5R1_UNORM,                       /* RGGG
> >         GGBB BBBA AAAA */
> >         +   MESA_FORMAT_A2B10G10R10_UNORM,/* RRRR RRRR RRGG GGGG GGGG
> >         BBBB BBBB BBAA */
> >         +   MESA_FORMAT_A2R10G10B10_UNORM,/* BBBB BBBB BBGG GGGG GGGG
> >         RRRR RRRR RRAA */
> >         +   MESA_FORMAT_R2G10B10A10_UNORM,/* AAAA AAAA AABB BBBB BBBB
> >         GGGG GGGG GGRR */
> >         +   MESA_FORMAT_A10B10G10R2_UNORM,/* RRGG GGGG GGGG BBBB BBBB
> >         BBAA AAAA AAAA */
> > 
> > 
> > I don't think these formats with 1 or 2 bits for red and more bits for
> > alpha actually exist.  In the GL spec, it expressly says that 5_5_5_1
> > and 10_10_10_2 are only allowed in combination with GL_RGBA or
> > GL_BGRA.  The GL_ABGR spec doesn't list any interaction with those
> > types, so I would assume that it's not allowed.
> > 
> 
> There is one glean test that explicitly checks for those combinations
> (pixelFormats). What should we do then? Allow them as current code
> does? or just remove them? If remove then the test program crashes
> because of the assert at the end of _mesa_format_from_format_and_type(),
> so we need to do some changes to avoid that.
> 
> I checked what other drivers do in that regard: NVIDIA proprietary driver
> allows them and ATI proprietary driver doesn't.
> 
> What do you think?
> 
> Sam

I also found that piglit's texture-packed-formats test program uses
GL_ABGR_EXT/GL_UNSIGNED_SHORT_5_5_5_1 and
GL_ABGR_EXT/GL_UNSIGNED_SHORT_1_5_5_5_REV combinations.

Sam


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141124/c8bcdbfa/attachment.sig>


More information about the mesa-dev mailing list