From 84c9e671edcc1358307879491bddef9f7d96f14b Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Mon, 26 Sep 2005 17:11:16 +0000 Subject: fix projective texturing for (swtcl) texture rectangles. Fix wrong argument order for texgen/texmat matrix multiplication. --- src/mesa/drivers/dri/radeon/radeon_swtcl.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/radeon/radeon_swtcl.c') diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c index 410ec102f4..9045619187 100644 --- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c +++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c @@ -499,10 +499,20 @@ static GLboolean run_texrect_stage( GLcontext *ctx, GLint instride = VB->TexCoordPtr[i]->stride; GLfloat (*out)[4] = store->texcoord[i].data; GLint j; - + + store->texcoord[i].size = VB->TexCoordPtr[i]->size; for (j = 0 ; j < VB->Count ; j++) { - out[j][0] = in[0] * iw; - out[j][1] = in[1] * ih; + switch (VB->TexCoordPtr[i]->size) { + case 4: + out[j][3] = in[3]; + /* fallthrough */ + case 3: + out[j][2] = in[2]; + /* fallthrough */ + default: + out[j][0] = in[0] * iw; + out[j][1] = in[1] * ih; + } in = (GLfloat *)((GLubyte *)in + instride); } -- cgit v1.2.3