diff options
author | Brian Paul <[email protected]> | 2012-11-30 10:04:48 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-11-30 12:08:06 -0700 |
commit | c73245882c7ff1277b190b97f093f7b423a22f10 (patch) | |
tree | cc42fc6cc7cd175407d511e845f75c49383936fc /src/mesa/drivers/dri | |
parent | ca3ed3e024864e91ca3cccc59fb96950e1d079b5 (diff) |
mesa: pass context parameter to gl_renderbuffer::Delete()
We sometimes need a rendering context when deleting renderbuffers.
Pass it explicitly instead of trying to grab a current context
(which might be NULL). The next patch will make use of this.
Note: this is a candidate for the stable branches.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 96f6c32d2ef..6a665218e06 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -87,7 +87,7 @@ intel_new_framebuffer(struct gl_context * ctx, GLuint name) /** Called by gl_renderbuffer::Delete() */ static void -intel_delete_renderbuffer(struct gl_renderbuffer *rb) +intel_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct intel_renderbuffer *irb = intel_renderbuffer(rb); @@ -95,7 +95,7 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb) intel_miptree_release(&irb->mt); - _mesa_delete_renderbuffer(rb); + _mesa_delete_renderbuffer(ctx, rb); } /** diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index c3e23412df7..c47bce8ccef 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -102,12 +102,12 @@ nouveau_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, } static void -nouveau_renderbuffer_del(struct gl_renderbuffer *rb) +nouveau_renderbuffer_del(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct nouveau_surface *s = &to_nouveau_renderbuffer(rb)->surface; nouveau_surface_ref(NULL, s); - _mesa_delete_renderbuffer(rb); + _mesa_delete_renderbuffer(ctx, rb); } static struct gl_renderbuffer * diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 291f2b78188..9ab74c46704 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -54,7 +54,7 @@ radeon_new_framebuffer(struct gl_context *ctx, GLuint name) } static void -radeon_delete_renderbuffer(struct gl_renderbuffer *rb) +radeon_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct radeon_renderbuffer *rrb = radeon_renderbuffer(rb); @@ -67,7 +67,7 @@ radeon_delete_renderbuffer(struct gl_renderbuffer *rb) if (rrb && rrb->bo) { radeon_bo_unref(rrb->bo); } - _mesa_delete_renderbuffer(rb); + _mesa_delete_renderbuffer(ctx, rb); } #if defined(RADEON_R100) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 3a47cdb5808..2474ed88fb0 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -251,14 +251,14 @@ choose_pixel_format(const struct gl_config *v) } static void -swrast_delete_renderbuffer(struct gl_renderbuffer *rb) +swrast_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct dri_swrast_renderbuffer *xrb = dri_swrast_renderbuffer(rb); TRACE; free(xrb->Base.Buffer); - _mesa_delete_renderbuffer(rb); + _mesa_delete_renderbuffer(ctx, rb); } /* see bytes_per_line in libGL */ |