From 3c450b2917ee2eef06197b9ef546f19d06b7d76a Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 2 Sep 2005 12:05:38 +0000 Subject: ATI_fragment_shader fixes: fix bug in passTexCoord (caused by recent changes). Fix sampling from wrong texture unit. Apply swizzling before texture sampling, and hopefully get non-projected coordinates from swrast. (still does not work at all with sw doom3, way too dark just the same as with the doom3 arb2 path) --- src/mesa/swrast/s_span.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast/s_span.c') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f99fa4cbaf..d8c912640e 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -432,7 +432,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) GLfloat r = span->tex[u][2]; GLfloat q = span->tex[u][3]; GLuint i; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Active || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -483,7 +483,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) GLfloat r = span->tex[u][2]; GLfloat q = span->tex[u][3]; GLuint i; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Active || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -566,7 +566,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) GLfloat r = span->tex[0][2]; GLfloat q = span->tex[0][3]; GLuint i; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Active || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -617,7 +617,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) GLfloat r = span->tex[0][2]; GLfloat q = span->tex[0][3]; GLuint i; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Active || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; -- cgit v1.2.3