[Mesa-dev] [PATCH 1/2] _meta_GenerateMipmap: Set MaxLevel before allocating level

Will Dyson will.dyson at gmail.com
Sun May 30 12:57:11 PDT 2010


On Fri, May 28, 2010 at 5:03 PM, Brian Paul <brianp at vmware.com> wrote:

> Still, the glTexImage() call should not be effected by the value of
> GL_TEXTURE_MAX_LEVEL.  I think there's a bug in the driver which this patch
> is just working around.

Yeah...

It seems to be related to the driver falling back to placing the
texture in regular malloc() memory instead of in a BO-backed miptree.
I had previously described this as "failing to allocate" the texture
memory, but that is a misleading way of putting it. Memory for the
level is allocated, and the texture validation process copies it into
a miptree. However, the CS checker terminates the program with an
error about "texture bo too small".

So far, my efforts to debug the process of migrating a texture in
malloc() memory to the miptree have not met success.

I think I can teach the driver not to use malloc() memory in this
situation, but I am concerned that this is still just working around
the underlying problem.

> I wouldn't be suprised to find a GL app which calls glTexImage2D(level=X)
> when GL_TEXTURE_MAX_LEVEL < X.  Can you look into fixing the issue in the
> driver?  Other drivers seem OK in this regard.

I had hoped to find time to look into it more deeply before now. I
haven't forgotten, and will keep working on it.

-- 
Will Dyson


More information about the mesa-dev mailing list