- raster->point_size_min = 0; /* temporary, will go away */
- raster->point_size_max = 1000; /* temporary, will go away */
-
- raster->point_smooth = ctx->Point.SmoothFlag;
- raster->point_sprite = ctx->Point.PointSprite;
- for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
- if (ctx->Point.CoordReplace[i]) {
- if (ctx->Point.SpriteOrigin == GL_UPPER_LEFT)
- raster->sprite_coord_mode[i] = PIPE_SPRITE_COORD_UPPER_LEFT;
- else
- raster->sprite_coord_mode[i] = PIPE_SPRITE_COORD_LOWER_LEFT;
+ if (!ctx->Point.PointSprite && ctx->Point.SmoothFlag)
+ raster->point_smooth = 1;
+
+ /* _NEW_POINT | _NEW_PROGRAM
+ */
+ if (ctx->Point.PointSprite) {
+ /* origin */
+ if ((ctx->Point.SpriteOrigin == GL_UPPER_LEFT) ^
+ (st_fb_orientation(ctx->DrawBuffer) == Y_0_BOTTOM))
+ raster->sprite_coord_mode = PIPE_SPRITE_COORD_UPPER_LEFT;
+ else
+ raster->sprite_coord_mode = PIPE_SPRITE_COORD_LOWER_LEFT;
+
+ /* Coord replacement flags. If bit 'k' is set that means
+ * that we need to replace GENERIC[k] attrib with an automatically
+ * computed texture coord.
+ */
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
+ if (ctx->Point.CoordReplace[i]) {
+ raster->sprite_coord_enable |= 1 << i;
+ }