Mesa (master): mesa: adjust texcoords for swrast sprite points.

Brian Paul brianp at kemper.freedesktop.org
Mon Oct 6 17:35:44 UTC 2008


Module: Mesa
Branch: master
Commit: 6e34fc0d374263ca40855ba4dcc237d961a79e34
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e34fc0d374263ca40855ba4dcc237d961a79e34

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Mon Oct  6 11:34:01 2008 -0600

mesa: adjust texcoords for swrast sprite points.

Fixes glean pointSprite test w/ software rendering

---

 src/mesa/swrast/s_points.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 846c485..61ff4d0 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -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




More information about the mesa-commit mailing list