summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_tritemp.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
committerBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
commite4b2356c07d31fbeeabb13b2fb47db703b473080 (patch)
treed8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/swrast/s_tritemp.h
parentebef61f5c0950572f9c6a81b08f447957461675c (diff)
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/swrast/s_tritemp.h')
-rw-r--r--src/mesa/swrast/s_tritemp.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 0be17ed0b38..fe19a3363f9 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -169,9 +169,9 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
} EdgeT;
#ifdef INTERP_Z
- const GLint depthBits = ctx->Visual.depthBits;
+ const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0;
- const GLfloat maxDepth = ctx->DepthMaxF;
+ const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF;
#define FixedToDepth(F) ((F) >> fixedToDepthShift)
#endif
EdgeT eMaj, eTop, eBot;
@@ -688,6 +688,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#endif
#ifdef INTERP_Z
# ifdef DEPTH_TYPE
+ struct gl_renderbuffer *zrb
+ = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
DEPTH_TYPE *zRow = NULL;
GLint dZRowOuter = 0, dZRowInner; /* offset in bytes */
# endif
@@ -853,7 +855,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
}
# ifdef DEPTH_TYPE
zRow = (DEPTH_TYPE *)
- _swrast_zbuffer_address(ctx, InterpToInt(fxLeftEdge), span.y);
+ zrb->GetPointer(ctx, zrb, InterpToInt(fxLeftEdge), span.y);
dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(DEPTH_TYPE);
# endif
}
@@ -1065,7 +1067,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
/* ff = fixed-pt fragment */
const GLint right = InterpToInt(fxRightEdge);
span.x = InterpToInt(fxLeftEdge);
-
if (right <= span.x)
span.end = 0;
else