[Nouveau] [rebased PATCH 1/2] nv50/exa: add support for more color formats

Marcin Slusarz marcin.slusarz at gmail.com
Tue Dec 29 09:06:34 PST 2009


On Mon, Dec 28, 2009 at 06:55:23PM +0100, Maarten Maathuis wrote:
> On Mon, Dec 28, 2009 at 6:37 PM, Marcin Slusarz
> <marcin.slusarz at gmail.com> wrote:
> >
> > ---
> >  src/nv50_exa.c |  155 ++++++++++++++++++++++++++++++++++++--------------------
> >  1 files changed, 100 insertions(+), 55 deletions(-)
> >
> > diff --git a/src/nv50_exa.c b/src/nv50_exa.c
> > index 1f5a4ac..54968e8 100644
> > --- a/src/nv50_exa.c
> > +++ b/src/nv50_exa.c
> > @@ -79,15 +79,16 @@ NV50EXA2DSurfaceFormat(PixmapPtr ppix, uint32_t *fmt)
> >
> >        switch (ppix->drawable.depth) {
> >        case 8 : *fmt = NV50_2D_SRC_FORMAT_R8_UNORM; break;
> > -       case 15: *fmt = NV50_2D_SRC_FORMAT_X1R5G5B5_UNORM; break;
> > -       case 16: *fmt = NV50_2D_SRC_FORMAT_R5G6B5_UNORM; break;
> > +       case 15:
> > +       case 16:
> > +               *fmt = NV50_2D_SRC_FORMAT_R5G6B5_UNORM;
> > +               break;
> 
> depth 15 is R5G5B5, why this change?

it's the only value which passes rendercheck tests
(rendercheck -t blend -o Src -f x1r5g5b5,r5g5b5)

> >        case 24: *fmt = NV50_2D_SRC_FORMAT_X8R8G8B8_UNORM; break;
> >        case 30: *fmt = NV50_2D_SRC_FORMAT_A2B10G10R10_UNORM; break;
> >        case 32: *fmt = NV50_2D_SRC_FORMAT_A8R8G8B8_UNORM; break;
> >        default:
> >                 NOUVEAU_FALLBACK("Unknown surface format for bpp=%d\n",
> >                                  ppix->drawable.depth);
> > -                return FALSE;
> 
> Why did you remove this?

because it's unreachable, NOUVEAU_FALLBACK returns FALSE
 


More information about the Nouveau mailing list