summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_pointtemp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index 3686e6a72e..1cfdf002af 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -292,7 +292,13 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
if (ctx->Texture.Unit[u]._ReallyEnabled) {
if (ctx->Point.CoordReplace[u]) {
GLfloat s = 0.5F + (x + 0.5F - vert->win[0]) / size;
- GLfloat t = 0.5F - (y + 0.5F - vert->win[1]) / size;
+ GLfloat t;
+#if GL_VERSION_2_0
+ if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
+ t = 0.5F + (y + 0.5F - vert->win[1]) / size;
+ else /* GL_UPPER_LEFT */
+#endif
+ t = 0.5F - (y + 0.5F - vert->win[1]) / size;
span->array->texcoords[u][count][0] = s;
span->array->texcoords[u][count][1] = t;
span->array->texcoords[u][count][3] = 1.0F;