diff options
author | Brian Paul <[email protected]> | 2002-09-23 16:37:13 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-09-23 16:37:13 +0000 |
commit | 681b8c9d1ba06c8c82e687a5ced369b72e6b1eb9 (patch) | |
tree | bfe222c6384be8ef34eadddb44262c9bd9ddc1c2 /src/mesa/swrast | |
parent | b7808884bb26b6abdd44a03ff47885fb646686a5 (diff) |
merge gl_texture_image RowStride from DRI 4.0.4
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 8 | ||||
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index fd2bf95b178..b8428c9a66a 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.66 2002/09/21 16:51:26 brianp Exp $ */ +/* $Id: s_texture.c,v 1.67 2002/09/23 16:37:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1119,7 +1119,8 @@ sample_linear_2d( GLcontext *ctx, GLuint texUnit, * Optimized 2-D texture sampling: * S and T wrap mode == GL_REPEAT * GL_NEAREST min/mag filter - * No border + * No border, + * RowStride == Width, * Format = GL_RGB */ static void @@ -1158,6 +1159,7 @@ opt_sample_rgb_2d( GLcontext *ctx, GLuint texUnit, * S and T wrap mode == GL_REPEAT * GL_NEAREST min/mag filter * No border + * RowStride == Width, * Format = GL_RGBA */ static void @@ -1205,7 +1207,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, const GLboolean repeatNoBorder = (tObj->WrapS == GL_REPEAT) && (tObj->WrapT == GL_REPEAT) - && (tImg->Border == 0) + && (tImg->Border == 0 && (tImg->Width == tImg->RowStride)) && (tImg->Format != GL_COLOR_INDEX); ASSERT(lambda != NULL); diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 4e2c40625b4..a26f7319c5d 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,4 +1,4 @@ -/* $Id: s_triangle.c,v 1.61 2002/08/07 00:45:07 brianp Exp $ */ +/* $Id: s_triangle.c,v 1.62 2002/09/23 16:37:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1136,6 +1136,7 @@ _swrast_choose_triangle( GLcontext *ctx ) && texObj2D->WrapS==GL_REPEAT && texObj2D->WrapT==GL_REPEAT && texImg->Border==0 + && texImg->Width == texImg->RowStride && (format == MESA_FORMAT_RGB || format == MESA_FORMAT_RGBA) && minFilter == magFilter && ctx->Light.Model.ColorControl == GL_SINGLE_COLOR |