diff options
author | Brian Paul <[email protected]> | 2005-09-23 01:20:09 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-23 01:20:09 +0000 |
commit | 0efc17c105f8239bf4fb128d570f2d343c45d430 (patch) | |
tree | 8ae8f47cecfb54ae1f13a93a81c5a76f37844ba2 /src/mesa/drivers/x11/xm_tri.c | |
parent | e5fce1694cdfca615022bf7b987835384902aceb (diff) |
Add Wrapper field to gl_renderbuffer. Used for wrapping one renderbuffer
with another, such as wrapping a hardware/win-sys RGB renderbuffer with a
software-based alpha buffer.
Previous alpha buffer wrapping was conflicting with the X driver's
xmesa_renderbuffer structure containment/inheritance. That lead to
memory corruption.
Diffstat (limited to 'src/mesa/drivers/x11/xm_tri.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_tri.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index 9340ea49743..87989f46f89 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -45,7 +45,7 @@ #define GET_XRB(XRB) struct xmesa_renderbuffer *XRB = \ - (struct xmesa_renderbuffer *) ctx->DrawBuffer->_ColorDrawBuffers[0][0] + (struct xmesa_renderbuffer *) ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped /**********************************************************************/ @@ -1430,8 +1430,7 @@ static swrast_tri_func get_triangle_func( GLcontext *ctx ) SWcontext *swrast = SWRAST_CONTEXT(ctx); XMesaContext xmesa = XMESA_CONTEXT(ctx); int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) - ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + GET_XRB(xrb); #ifdef DEBUG triFuncName = NULL; |