aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_swtcl.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2005-09-26 17:11:16 +0000
committerRoland Scheidegger <[email protected]>2005-09-26 17:11:16 +0000
commit84c9e671edcc1358307879491bddef9f7d96f14b (patch)
treecfcad5352fa888713088f8dafc5e35355ad4e82e /src/mesa/drivers/dri/radeon/radeon_swtcl.c
parentad271b8c98021dc82c0714d768a6642aee10794f (diff)
fix projective texturing for (swtcl) texture rectangles. Fix wrong argument order for texgen/texmat matrix multiplication.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_swtcl.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 410ec102f47..90456191878 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);
}