diff options
author | Brian Paul <[email protected]> | 2012-01-16 12:35:49 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-24 14:12:31 -0700 |
commit | d16e71eeb47d1e67930f6e86a80dc926468224d9 (patch) | |
tree | b36b872c2d2885d112119d2c3dee39ece0892cf2 /src/mesa/drivers/x11/xm_api.c | |
parent | f2479530b8be3866c234ac759a7fa84e634dd1aa (diff) |
xlib: derive xmesa_renderbuffer from swrast_renderbuffer
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 0f41218e63e..fb8288922c8 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -309,7 +309,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, b->frontxrb->drawable = d; b->frontxrb->pixmap = (XMesaPixmap) d; _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_FRONT_LEFT, - &b->frontxrb->Base); + &b->frontxrb->Base.Base); /* * Back renderbuffer @@ -326,7 +326,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, b->db_mode = vis->ximage_flag ? BACK_XIMAGE : BACK_PIXMAP; _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_BACK_LEFT, - &b->backxrb->Base); + &b->backxrb->Base.Base); } /* @@ -1469,7 +1469,9 @@ GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height, { struct gl_renderbuffer *rb = b->mesa_buffer.Attachment[BUFFER_DEPTH].Renderbuffer; - if (!rb || !rb->Buffer) { + struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); + + if (!xrb || !xrb->Base.Buffer) { *width = 0; *height = 0; *bytesPerValue = 0; @@ -1481,7 +1483,7 @@ GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height, *height = b->mesa_buffer.Height; *bytesPerValue = b->mesa_buffer.Visual.depthBits <= 16 ? sizeof(GLushort) : sizeof(GLuint); - *buffer = (void *) rb->Buffer; + *buffer = (void *) xrb->Base.Buffer; return GL_TRUE; } } |