[Piglit] [PATCH] Add test case to verify large textures are handled correctly in mesa

Brian Paul brianp at vmware.com
Mon Feb 27 16:37:25 PST 2012


On 02/27/2012 05:08 PM, Anuj Phogat wrote:
> On Mon, Feb 27, 2012 at 2:37 PM, Brian Paul <brianp at vmware.com
> <mailto:brianp at vmware.com>> wrote:
>     On 02/27/2012 03:02 PM, Anuj Phogat wrote:

>
>     I haven't double-checked the code, but why are you testing a
>     texture size that's larger than the advertised max size?
>
> Just to verify that such a case is handled properly in mesa. There was
> a bug relevant to this case:
> https://bugs.freedesktop.org/show_bug.cgi?id=44970
> If you suggest, this case can be moved to texture-border test i'm
> developing currently.

I think a separate test would be better.  This test is verifying that 
the largest advertised texture size works.  That's a little different 
than testing if too large of texture generates a GL error.


>     OK, I'm looking at the loop at line 186:
>
>             for (side = maxSide - 100; side < maxSide + 2; side++) {
>                     switch (target) {
>                     case GL_TEXTURE_1D:
>
>     I guess I don't understand why you're doing that.  It seems to me
>     you just have to query the max texture size (both via
>     glGetIntegerv() and the proxy test) then try to create a texture
>     of that size.  Testing 102 other size variations isn't necessary.
>
> I originally put that loop starting from maxSide/2 to detect the
> texture size where driver segfaults or  starts throwing
> GL_OUT_OF_MEMORY. But that makes it a huge loop and i was anyway not
> able to conclude on a specific texture size which causes segfault. So,
> now it makes sense to remove this loop.

Sounds good.

-Brian



More information about the Piglit mailing list