Merge branch '7.8'
authorMichel Dänzer <daenzer@vmware.com>
Fri, 26 Mar 2010 17:42:16 +0000 (18:42 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Fri, 26 Mar 2010 17:42:16 +0000 (18:42 +0100)
Conflicts:
src/mesa/drivers/dri/intel/intel_mipmap_tree.c - left what was in master

1  2 
src/mesa/drivers/dri/swrast/swrast_span.c
src/mesa/drivers/dri/swrast/swrast_spantemp.h

index c5681e34a916beeaf80e1df8ca1214b12fd8436e,d896e154f76e9931b0ac8e1b6186c77b7eddbc5e..c7d0bfdac72b6fdb8f11aae3fcd316923e942082
@@@ -3,7 -3,6 +3,7 @@@
   * Version:  7.1
   *
   * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
 + * Copyright 2008, 2010 George Sapountzis <gsapountzis@gmail.com>
   *
   * Permission is hereby granted, free of charge, to any person obtaining a
   * copy of this software and associated documentation files (the "Software"),
   * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   */
  
 -/*
 - * Authors:
 - *    George Sapountzis <gsap7@yahoo.gr>
 - */
 -
  #include "swrast_priv.h"
  
  #define YFLIP(_xrb, Y) ((_xrb)->Base.Height - (Y) - 1)
@@@ -236,7 -240,7 +236,7 @@@ static const GLubyte kernel[16] = 
     struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
  #define INIT_PIXEL_PTR(P, X, Y) \
     GLushort *P = (GLushort *)row;
- #define INC_PIXEL_PTR(P) P += 2
+ #define INC_PIXEL_PTR(P) P++
  #define STORE_PIXEL(DST, X, Y, VALUE) \
     STORE_PIXEL_R5G6B5(DST, X, Y, VALUE)
  #define FETCH_PIXEL(DST, SRC) \
index 079726ae4abfc2488da04ad1b34d432281587f9f,8487361714746ccf2ed51d358e57ba578ae8dc87..1e9405eebfba725d47373a3416f9e7fbf0c19171
  #define _SWRAST_SPANTEMP_ONCE
  
  static INLINE void
- PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
+ PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p )
  {
 -    __DRIcontext *ctx = swrast_context(glCtx);
 -    __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer);
 +    __DRIcontext *ctx = swrast_context(glCtx)->cPriv;
 +    __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer)->dPriv;
  
      __DRIscreen *screen = ctx->driScreenPriv;
  
@@@ -53,8 -53,8 +53,8 @@@
  static INLINE void
  GET_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
  {
 -    __DRIcontext *ctx = swrast_context(glCtx);
 -    __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer);
 +    __DRIcontext *ctx = swrast_context(glCtx)->cPriv;
 +    __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer)->dPriv;
  
      __DRIscreen *screen = ctx->driScreenPriv;
  
@@@ -65,8 -65,8 +65,8 @@@
  static INLINE void
  PUT_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
  {
 -    __DRIcontext *ctx = swrast_context(glCtx);
 -    __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer);
 +    __DRIcontext *ctx = swrast_context(glCtx)->cPriv;
 +    __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer)->dPriv;
  
      __DRIscreen *screen = ctx->driScreenPriv;
  
@@@ -78,8 -78,8 +78,8 @@@
  static INLINE void
  GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
  {
 -    __DRIcontext *ctx = swrast_context(glCtx);
 -    __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer);
 +    __DRIcontext *ctx = swrast_context(glCtx)->cPriv;
 +    __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer)->dPriv;
  
      __DRIscreen *screen = ctx->driScreenPriv;
  
@@@ -168,7 -168,8 +168,8 @@@ NAME(put_row)( GLcontext *ctx, struct g
     if (mask) {
        for (i = 0; i < count; i++) {
           if (mask[i]) {
-             RB_TYPE pixel[4];
+             RB_TYPE row[4];
+             INIT_PIXEL_PTR(pixel, x, y);
              STORE_PIXEL(pixel, x + i, y, src[i]);
              PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
           }
@@@ -200,7 -201,8 +201,8 @@@ NAME(put_row_rgb)( GLcontext *ctx, stru
     if (mask) {
        for (i = 0; i < count; i++) {
           if (mask[i]) {
-             RB_TYPE pixel[4];
+             RB_TYPE row[4];
+             INIT_PIXEL_PTR(pixel, x, y);
  #ifdef STORE_PIXEL_RGB
              STORE_PIXEL_RGB(pixel, x + i, y, src[i]);
  #else
@@@ -240,7 -242,8 +242,8 @@@ NAME(put_mono_row)( GLcontext *ctx, str
     if (mask) {
        for (i = 0; i < count; i++) {
           if (mask[i]) {
-             RB_TYPE pixel[4];
+             RB_TYPE row[4];
+             INIT_PIXEL_PTR(pixel, x, y);
              STORE_PIXEL(pixel, x + i, y, src);
              PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
           }
@@@ -272,7 -275,8 +275,8 @@@ NAME(put_values)( GLcontext *ctx, struc
     ASSERT(mask);
     for (i = 0; i < count; i++) {
        if (mask[i]) {
-          RB_TYPE pixel[4];
+          RB_TYPE row[4];
+          INIT_PIXEL_PTR(pixel, x, y);
           STORE_PIXEL(pixel, x[i], y[i], src[i]);
           PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
        }
@@@ -294,7 -298,8 +298,8 @@@ NAME(put_mono_values)( GLcontext *ctx, 
     ASSERT(mask);
     for (i = 0; i < count; i++) {
        if (mask[i]) {
-          RB_TYPE pixel[4];
+          RB_TYPE row[4];
+          INIT_PIXEL_PTR(pixel, x, y);
           STORE_PIXEL(pixel, x[i], y[i], src);
           PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
        }