Hi Brian,
Thanks for the review. I modified the fix according to your comments
and it is working just fine. You will find the patch below.
Continue your good work.
Etienne
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index f55e234..b2c5574 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1196,7 +1196,9 @@ sample_linear_2d( GLcontext *ctx,
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
(void) lambda;
- if (tObj->WrapS == GL_REPEAT && tObj->WrapT == GL_REPEAT) {
+ if (tObj->WrapS == GL_REPEAT &&
+ tObj->WrapT == GL_REPEAT &&
+ image->_IsPowerOfTwo) {
for (i=0;i<n;i++) {
sample_2d_linear_repeat(ctx, tObj, image, texcoords[i], rgba[i]);
}
On Tue, Feb 13, 2007 at 08:23:28PM -0700, Brian Paul wrote:
> On 2/13/07, Etienne Clement <[EMAIL PROTECTED]> wrote:
> >Hi all,
> >
> >Texture sampling for non-power-of-two textures (NPOT) using GL_LINEAR
> >min/max filtering and GL_REPEAT wrap mode was broken in the software
> >rasterizer. The function used to compute the texel locations in this
> >case was not NPOT ready. The fix was pretty straightforward. You will
> >find the patch below.
>
> [...]
>
> Actually, the intention was that sample_2d_linear_repeat() be only
> used for the POT case as it's a (somewhat) optimized path.
>
> I think the line around 1200:
>
> if (tObj->WrapS == GL_REPEAT && tObj->WrapT == GL_REPEAT) {
>
> needs to also check if image->_IsPowerOfTwo is true.
>
> Can you try that instead and see if it fixes your problem?
>
> -Brian
--
Etienne Clement -- software developer
email: [EMAIL PROTECTED]
tel: 514.954.7483 fax: 514.393.0110
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev