On Wed, 21 Sep 2011 18:56:53 -0600, Brian Paul <brian.e.p...@gmail.com> wrote: > From: Brian Paul <bri...@vmware.com> > > These fields were only used for swrast so move them into > swrast_texture_image. > diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c > index 14ee0eb..1dcb08c 100644 > --- a/src/mesa/swrast/s_texture.c > +++ b/src/mesa/swrast/s_texture.c > @@ -85,6 +85,19 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx, > else > swImg->_IsPowerOfTwo = GL_FALSE; > > + /* Compute Width/Height/DepthScale for mipmap lod computation */ > + if (texImage->TexObject->Target == GL_TEXTURE_RECTANGLE_NV) { > + /* scale = 1.0 since texture coords directly map to texels */ > + swImg->WidthScale = 1.0; > + swImg->HeightScale = 1.0; > + swImg->DepthScale = 1.0; > + } > + else { > + swImg->WidthScale = (GLfloat) texImage->Width; > + swImg->HeightScale = (GLfloat) texImage->Height; > + swImg->DepthScale = (GLfloat) texImage->Depth; > + } > + > return texImage->Data != NULL; > }
So, what I've been confused about with these patches is: what guarantees that this has been called on a hardware driver that might sometimes fall back to software? Several paths use AllocTextureImageBuffer, but notably TexImage2D doesn't. On the other hand, unless I just failed at testing, I couldn't detect any regressions, even with no_rast=true.
pgpeOF0UCa569.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev