[Mesa-dev] [PATCH 11/15] mesa: Add fallback from RGB_FLOAT16 to RGBA_FLOAT16 before RGBA_FLOAT32.
Eric Anholt
eric at anholt.net
Thu Nov 17 08:50:52 PST 2011
On Wed, 16 Nov 2011 01:51:31 -0800 (PST), Jose Fonseca <jfonseca at vmware.com> wrote:
> Neither DX9 or DX10 expose equivalent to GL_RGB16F_ARB:
> - http://msdn.microsoft.com/en-us/library/bb172558.aspx (D3D9)
> - http://msdn.microsoft.com/en-us/library/bb173059.aspx (D3D10)
>
> So probably no hardware ever will support them.
>
> Even for software rendering it is a very nasty format to support, because it is not 32bits aligned (48bits).
>
> Unfortunately it doesn't look like we can simply not support GL_RGB16F_ARB though.
It has to be supported, but not necessarily as a render taget.
Apparently since gen5 we can actually do 16-bit RGB float, snorm, and
unorm sampling.
> ----- Original Message -----
> > The i965 driver can't do RGB float16 at all.
> > ---
> > src/mesa/main/texformat.c | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
> > index aebe38e..ea42ced 100644
> > --- a/src/mesa/main/texformat.c
> > +++ b/src/mesa/main/texformat.c
> > @@ -357,6 +357,7 @@ _mesa_choose_tex_format( struct gl_context *ctx,
> > GLint internalFormat,
> > case GL_RGB16F_ARB:
> > RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
> > RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
> > + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
>
> RGB_FLOAT32 is 96bits where as RGBA_FLOAT16 is 64bits, so I think that
> RGBA_FLOAT16 should be tried before RGB_FLOAT32, as it is better from
> all POVs
Yuck, top-posting and inline comments? I almost missed this, and it's a
good point. I'll move it up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111117/693c7bec/attachment.pgp>
More information about the mesa-dev
mailing list