[Mesa-dev] [PATCH 20/23] mesa: remove last of MAX_WIDTH, MAX_HEIGHT

Jose Fonseca jfonseca at vmware.com
Tue Feb 21 07:08:33 PST 2012


----- Original Message -----
> On 02/21/2012 02:22 AM, Jose Fonseca wrote:
> > Your series is a huge step forward already.  But I wonder if we
> > could go just a bit further and not add MAX_VIEWPORT_WIDTH/HEIGHT
> > and MAX_RENDERBUFFER_SIZE defines.
> >
> > Would it be possible to derive these limits from the maximum
> > texture size? Either the driver reported max texture size, or just
> > define them in terms of MAX_TEXTURE_LEVELS so that there are less
> > places to change next time we need to bump them.
> >
> > Alternatively, we could set them to zero, and later assert that the
> > driver fill them correctly. I'm actually surprised that no driver
> > actually sets them. Granted, viewport can be bigger than the
> > maximum texture size, but there is no guarantee is there that old
> > hardware drivers won't get broken next time we need to bump this
> > to suite a new hardware.
> 
> I considered defining the max viewport size and renderbuffer size in
> terms of the max texture size but I wan't sure if that's typically
> true for most hardware.  As you said, the max viewport size could be
> larger than max texture/surface size, for example.
> 
> I guess I'd like to just leave it as-is for now so I can wrap up this
> series.  It'd be easy to change later.

Sure.

> I noticed that the gallium state tracker isn't setting the max
> viewport or renderbuffer size values in st_extensions.c.  We could
> set
> those to the max texture size for the time being...

Sounds good. FWIW, wglinfo on nvidia reports that maximum viewport and texture size match. And I'd expect that maximum renderbuffer and texture sizes to match too.

Jose


More information about the mesa-dev mailing list