Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / mesa / swrast / s_points.c
index 22639c58ff706c3bf93ed033ca5c3c5f007d8212..61ff4d0b84cde4395ddf641125f8bdd124f21ef8 100644 (file)
@@ -27,7 +27,7 @@
 #include "main/colormac.h"
 #include "main/context.h"
 #include "main/macros.h"
-#include "texstate.h"
+#include "main/texstate.h"
 #include "s_context.h"
 #include "s_feedback.h"
 #include "s_points.h"
@@ -129,13 +129,13 @@ sprite_point(GLcontext *ctx, const SWvertex *vert)
       s = 0.0;
       dsdx = 1.0 / size;
       if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT) {
-         t0 = 0.0;
          dtdy = 1.0 / size;
+         t0 = 0.5 * dtdy;
       }
       else {
          /* GL_UPPER_LEFT */
-         t0 = 1.0;
          dtdy = -1.0 / size;
+         t0 = 1.0 + 0.5 * dtdy;
       }
 
       ATTRIB_LOOP_BEGIN