From 0095be534d633848bc12d73ed9dcc1b9aa41f00a Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 11 Aug 2007 21:21:12 +0100 Subject: Change/fix surface allocation functions. Use xmesa_new_color_surface() for front/back renderbuffer surfaces. Use xmesa_surface_alloc() for everything else (textures, other renderbuffers) --- src/mesa/drivers/x11/xm_buffer.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/mesa/drivers/x11/xm_buffer.c') diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 4cd2ab7c6b..52629aca18 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -252,10 +252,6 @@ static void finish_surface_init(GLcontext *ctx, struct xmesa_renderbuffer *xrb) { struct pipe_context *pipe = ctx->st->pipe; - - if (!xrb->St.surface) { - xrb->St.surface = xmesa_new_surface(ctx, xrb); - } if (!xrb->St.surface->region) { xrb->St.surface->region = pipe->region_alloc(pipe, 1, 0, 0, 0x0); } @@ -391,10 +387,9 @@ xmesa_create_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual, } /* only need to set Red/Green/EtcBits fields for user-created RBs */ - xrb->St.surface = xmesa_surface_alloc(pipe, pipeFormat); + xrb->St.surface = xmesa_new_color_surface(pipe, pipeFormat); xms = (struct xmesa_surface *) xrb->St.surface; xms->xrb = xrb; - } return xrb; } -- cgit v1.2.3