From: Brian Paul Date: Mon, 16 Jan 2012 19:35:45 +0000 (-0700) Subject: swrast: allocate swrast_renderbuffers instead of gl_renderbuffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2479530b8be3866c234ac759a7fa84e634dd1aa;p=mesa.git swrast: allocate swrast_renderbuffers instead of gl_renderbuffers --- diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index 52697f2ac75..af02b02f1ba 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -259,7 +259,7 @@ add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, assert(fb->Attachment[b].Renderbuffer == NULL); - rb = _mesa_new_renderbuffer(ctx, 0); + rb = ctx->Driver.NewRenderbuffer(ctx, 0); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating color buffer"); return GL_FALSE; @@ -297,7 +297,7 @@ add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, assert(fb->Attachment[BUFFER_DEPTH].Renderbuffer == NULL); - rb = _mesa_new_renderbuffer(ctx, 0); + rb = _swrast_new_soft_renderbuffer(ctx, 0); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating depth buffer"); return GL_FALSE; @@ -342,7 +342,7 @@ add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, assert(fb->Attachment[BUFFER_STENCIL].Renderbuffer == NULL); - rb = _mesa_new_renderbuffer(ctx, 0); + rb = _swrast_new_soft_renderbuffer(ctx, 0); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating stencil buffer"); return GL_FALSE; @@ -367,7 +367,7 @@ add_depth_stencil_renderbuffer(struct gl_context *ctx, assert(fb->Attachment[BUFFER_DEPTH].Renderbuffer == NULL); assert(fb->Attachment[BUFFER_STENCIL].Renderbuffer == NULL); - rb = _mesa_new_renderbuffer(ctx, 0); + rb = _swrast_new_soft_renderbuffer(ctx, 0); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating depth+stencil buffer"); return GL_FALSE; @@ -406,7 +406,7 @@ add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, assert(fb->Attachment[BUFFER_ACCUM].Renderbuffer == NULL); - rb = _mesa_new_renderbuffer(ctx, 0); + rb = _swrast_new_soft_renderbuffer(ctx, 0); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating accum buffer"); return GL_FALSE; @@ -446,7 +446,7 @@ add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, assert(numBuffers <= MAX_AUX_BUFFERS); for (i = 0; i < numBuffers; i++) { - struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, 0); + struct gl_renderbuffer *rb = _swrast_new_soft_renderbuffer(ctx, 0); assert(fb->Attachment[BUFFER_AUX0 + i].Renderbuffer == NULL); diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c index ebfba6d5da8..23a7388c0d2 100644 --- a/src/mesa/swrast/s_texrender.c +++ b/src/mesa/swrast/s_texrender.c @@ -37,7 +37,7 @@ wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) ASSERT(att->Type == GL_TEXTURE); ASSERT(att->Renderbuffer == NULL); - rb = CALLOC_STRUCT(gl_renderbuffer); + rb = ctx->Driver.NewRenderbuffer(ctx, name); if (!rb) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "wrap_texture"); return;