summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11/xm_buffer.c')
-rw-r--r--src/mesa/drivers/x11/xm_buffer.c7
1 files changed, 1 insertions, 6 deletions
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;
}