[Mesa-dev] [PATCH 12/22] swast: replace renderbuffer->GetPointer() with _swrast_pixel_address()

Brian Paul brianp at vmware.com
Sun Dec 18 19:08:17 PST 2011


---
 src/mesa/swrast/s_linetemp.h |    2 +-
 src/mesa/swrast/s_triangle.c |    4 ++--
 src/mesa/swrast/s_tritemp.h  |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index f9f2d29..1668f7d 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -166,7 +166,7 @@ NAME( struct gl_context *ctx, const SWvertex *vert0, const SWvertex *vert1 )
    */
 
 #ifdef DEPTH_TYPE
-   zPtr = (DEPTH_TYPE *) zrb->GetPointer(ctx, zrb, x0, y0);
+   zPtr = (DEPTH_TYPE *) _swrast_pixel_address(zrb, x0, y0);
 #endif
 #ifdef PIXEL_ADDRESS
    pixelPtr = (PIXEL_TYPE *) PIXEL_ADDRESS(x0,y0);
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index b4f8e74..10d077f 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -887,7 +887,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
    if (rb->Format == MESA_FORMAT_Z16) {					\
       GLuint i;								\
       const GLushort *zRow = (const GLushort *)				\
-         rb->GetPointer(ctx, rb, span.x, span.y);			\
+         _swrast_pixel_address(rb, span.x, span.y);                     \
       for (i = 0; i < span.end; i++) {					\
          GLuint z = FixedToDepth(span.z);				\
          if (z < zRow[i]) {						\
@@ -899,7 +899,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
    else {								\
       GLuint i;								\
       const GLuint *zRow = (const GLuint *)				\
-         rb->GetPointer(ctx, rb, span.x, span.y);			\
+         _swrast_pixel_address(rb, span.x, span.y);			\
       for (i = 0; i < span.end; i++) {					\
          if ((GLuint)span.z < zRow[i]) {				\
             q->Result++;						\
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 4d6309b..061759d 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -631,7 +631,7 @@ static void NAME(struct gl_context *ctx, const SWvertex *v0,
                   }
 #  ifdef DEPTH_TYPE
                   zRow = (DEPTH_TYPE *)
-                    zrb->GetPointer(ctx, zrb, FixedToInt(fxLeftEdge), span.y);
+                    _swrast_pixel_address(zrb, FixedToInt(fxLeftEdge), span.y);
                   dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(DEPTH_TYPE);
 #  endif
                }
-- 
1.7.3.4



More information about the mesa-dev mailing list