test for POT before using sample_2d_linear_repeat()

This commit is contained in:
Etienne Clement 2007-02-14 13:21:12 -07:00 committed by Brian
parent 7d8ed0f5f5
commit 1e2b469635
1 changed files with 3 additions and 1 deletions

View File

@ -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]);
}