diff options
author | Brian Paul <brianp@vmware.com> | 2012-01-16 12:28:42 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2012-01-24 14:12:27 -0700 |
commit | 59a5b5a193d5d9c5776aa586b34657b6e315479d (patch) | |
tree | 405a0a59ae57f9b68de416ce69dcb4f5928bc29e | |
parent | ab331140c68d1c157e69ea8e53b44729355fa43c (diff) |
mesa: remove gl_renderbuffer::Wrapped
There's no such thing as renderbuffer wrappers anymore.
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_driver.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_line.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_tri.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/renderbuffer.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_framebuffer.c | 2 |
7 files changed, 13 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index d1e269af24..ba818f0030 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -96,7 +96,7 @@ nouveau_clear(struct gl_context *ctx, GLbitfield buffers) continue; s = &to_nouveau_renderbuffer( - fb->Attachment[i].Renderbuffer->Wrapped)->surface; + fb->Attachment[i].Renderbuffer)->surface; if (buf & BUFFER_BITS_COLOR) { mask = pack_rgba_i(s->format, ctx->Color.ColorMask[0]); diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 9ab77e2a63..b1439d8d59 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -329,7 +329,7 @@ can_do_DrawPixels_8R8G8B(struct gl_context *ctx, GLenum format, GLenum type) if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; if (rb) { - struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb->Wrapped); + struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); if (xrb && xrb->pixmap && /* drawing to pixmap or window */ _mesa_get_format_bits(xrb->Base.Format, GL_ALPHA_BITS) == 0) { @@ -393,7 +393,7 @@ xmesa_DrawPixels_8R8G8B( struct gl_context *ctx, XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */ struct xmesa_renderbuffer *xrb - = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); const int srcX = clippedUnpack.SkipPixels; const int srcY = clippedUnpack.SkipRows; const int rowLength = clippedUnpack.RowLength; @@ -462,7 +462,7 @@ can_do_DrawPixels_5R6G5B(struct gl_context *ctx, GLenum format, GLenum type) if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; if (rb) { - struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb->Wrapped); + struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); if (xrb && xrb->pixmap && /* drawing to pixmap or window */ _mesa_get_format_bits(xrb->Base.Format, GL_ALPHA_BITS) == 0) { @@ -527,7 +527,7 @@ xmesa_DrawPixels_5R6G5B( struct gl_context *ctx, XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */ struct xmesa_renderbuffer *xrb - = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); const int srcX = clippedUnpack.SkipPixels; const int srcY = clippedUnpack.SkipRows; const int rowLength = clippedUnpack.RowLength; @@ -597,9 +597,9 @@ can_do_CopyPixels(struct gl_context *ctx, GLenum type) ctx->DrawBuffer && ctx->DrawBuffer->_ColorDrawBuffers[0]) { struct xmesa_renderbuffer *srcXrb - = xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped); + = xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer); struct xmesa_renderbuffer *dstXrb - = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); if (srcXrb->pixmap && dstXrb->pixmap) { return GL_TRUE; } @@ -625,9 +625,9 @@ xmesa_CopyPixels( struct gl_context *ctx, XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */ struct xmesa_renderbuffer *srcXrb - = xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped); + = xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer); struct xmesa_renderbuffer *dstXrb - = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); ASSERT(dpy); ASSERT(gc); diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index ad0336f398..dc2687df24 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -120,7 +120,7 @@ void xmesa_choose_point( struct gl_context *ctx ) #define GET_XRB(XRB) struct xmesa_renderbuffer *XRB = \ - xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped) + xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]) /* @@ -461,7 +461,7 @@ get_line_func(struct gl_context *ctx) if (ctx->Line.StippleFlag) return (swrast_line_func) NULL; if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_line_func) NULL; - xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); if (xrb->ximage && swrast->_RasterMask==DEPTH_BIT diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index a2dbf572dc..12a20491a5 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -43,7 +43,7 @@ #define GET_XRB(XRB) struct xmesa_renderbuffer *XRB = \ - xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped) + xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]) /**********************************************************************/ @@ -1023,7 +1023,7 @@ get_triangle_func(struct gl_context *ctx) ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) return (swrast_tri_func) NULL; - xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); + xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]); if (xrb->ximage) { if ( ctx->Light.ShadeModel==GL_SMOOTH diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 919244dfa3..0fcbfdf773 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2565,9 +2565,6 @@ struct gl_renderbuffer GLubyte *Map; GLint RowStrideBytes; - /* Used to wrap one renderbuffer around another: */ - struct gl_renderbuffer *Wrapped; - /* Delete this renderbuffer */ void (*Delete)(struct gl_renderbuffer *rb); diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 4bc4165fb9..1bb09bfe6a 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -54,11 +54,6 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name) rb->Height = 0; rb->InternalFormat = GL_RGBA; rb->Format = MESA_FORMAT_NONE; - - /* Point back to ourself so that we don't have to check for Wrapped==NULL - * all over the drivers. - */ - rb->Wrapped = rb; } diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index 76386fe017..a8907c1577 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -139,7 +139,6 @@ update_framebuffer_state( struct st_context *st ) */ strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); if (strb) { - strb = st_renderbuffer(strb->Base.Wrapped); if (strb->rtt) { /* rendering to a GL texture, may have to update surface */ update_renderbuffer_surface(st, strb); @@ -149,7 +148,6 @@ update_framebuffer_state( struct st_context *st ) else { strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer); if (strb) { - strb = st_renderbuffer(strb->Base.Wrapped); assert(strb->surface); pipe_surface_reference(&framebuffer->zsbuf, strb->surface); } |