aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-27 08:37:52 +0200
committermarha <marha@users.sourceforge.net>2011-10-27 08:37:52 +0200
commit2a9be4af293f20fa33cc34fbc3b72e2235d91090 (patch)
treed41608bda1d56be1aa96857dee20e988b53760a3 /mesalib/src/mesa/swrast/s_triangle.c
parent9d53da0fbb9ae6df9a38ad40df4f53cd28287235 (diff)
parentd662d461634660f5c0f3998b5eb7d7ed3bd5a25f (diff)
downloadvcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.tar.gz
vcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.tar.bz2
vcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/swrast/s_triangle.c')
-rw-r--r--mesalib/src/mesa/swrast/s_triangle.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/mesalib/src/mesa/swrast/s_triangle.c b/mesalib/src/mesa/swrast/s_triangle.c
index 839c4fd08..b4f8e7479 100644
--- a/mesalib/src/mesa/swrast/s_triangle.c
+++ b/mesalib/src/mesa/swrast/s_triangle.c
@@ -127,10 +127,12 @@ _swrast_culltriangle( struct gl_context *ctx,
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
obj->Image[0][obj->BaseLevel]; \
+ const struct swrast_texture_image *swImg = \
+ swrast_texture_image_const(texImg); \
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
const GLint twidth_log2 = texImg->WidthLog2; \
- const GLubyte *texture = (const GLubyte *) texImg->Data; \
+ const GLubyte *texture = (const GLubyte *) swImg->Data; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
@@ -181,10 +183,12 @@ _swrast_culltriangle( struct gl_context *ctx,
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
obj->Image[0][obj->BaseLevel]; \
+ const struct swrast_texture_image *swImg = \
+ swrast_texture_image_const(texImg); \
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
const GLint twidth_log2 = texImg->WidthLog2; \
- const GLubyte *texture = (const GLubyte *) texImg->Data; \
+ const GLubyte *texture = (const GLubyte *) swImg->Data; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
@@ -533,9 +537,11 @@ affine_span(struct gl_context *ctx, SWspan *span,
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
obj->Image[0][obj->BaseLevel]; \
+ const struct swrast_texture_image *swImg = \
+ swrast_texture_image_const(texImg); \
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
- info.texture = (const GLchan *) texImg->Data; \
+ info.texture = (const GLchan *) swImg->Data; \
info.twidth_log2 = texImg->WidthLog2; \
info.smask = texImg->Width - 1; \
info.tmask = texImg->Height - 1; \
@@ -800,7 +806,9 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
obj->Image[0][obj->BaseLevel]; \
- info.texture = (const GLchan *) texImg->Data; \
+ const struct swrast_texture_image *swImg = \
+ swrast_texture_image_const(texImg); \
+ info.texture = (const GLchan *) swImg->Data; \
info.twidth_log2 = texImg->WidthLog2; \
info.smask = texImg->Width - 1; \
info.tmask = texImg->Height - 1; \
@@ -1062,7 +1070,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& texObj2D->_Swizzle == SWIZZLE_NOOP
&& swImg->_IsPowerOfTwo
&& texImg->Border == 0
- && texImg->Width == texImg->RowStride
+ && texImg->Width == swImg->RowStride
&& (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR