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

2010-05-30 Thread Will Dyson
On Fri, May 28, 2010 at 5:03 PM, Brian Paul 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 t

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

2010-05-28 Thread Eric Anholt
On Fri, 28 May 2010 13:35:46 -0400, Will Dyson wrote: > The radeon driver will fail to allocate miptree space for a new level > that is outside of BaseLevel..MaxLevel. Then it fails later, trying to > migrate the level to a miptree. Set MaxLevel to dstLevel before > allocating the level, and avoid

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

2010-05-28 Thread Brian Paul
Will Dyson wrote: On Fri, May 28, 2010 at 1:57 PM, Brian Paul wrote: @@ -2400,6 +2400,9 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, break; } + /* Set MaxLevel large enough to hold the new level when we allocate it */ + _mesa_TexParameteri(target, GL_TE

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

2010-05-28 Thread Will Dyson
On Fri, May 28, 2010 at 1:57 PM, Brian Paul wrote: >> @@ -2400,6 +2400,9 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum >> target, >>          break; >>       } >>  +      /* Set MaxLevel large enough to hold the new level when we >> allocate it  */ >> +      _mesa_TexParameteri(target, GL_TE

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

2010-05-28 Thread Brian Paul
Will Dyson wrote: The radeon driver will fail to allocate miptree space for a new level that is outside of BaseLevel..MaxLevel. Then it fails later, trying to migrate the level to a miptree. Set MaxLevel to dstLevel before allocating the level, and avoid triggering the problem. Signed-off-by: Wi

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

2010-05-28 Thread Will Dyson
The radeon driver will fail to allocate miptree space for a new level that is outside of BaseLevel..MaxLevel. Then it fails later, trying to migrate the level to a miptree. Set MaxLevel to dstLevel before allocating the level, and avoid triggering the problem. Signed-off-by: Will Dyson --- src/m