From e131c46b20241737ceba4856dbe01dcca6dd2c03 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 9 Jan 2008 16:55:32 -0500 Subject: [intel] Simplify intelCreateBuffer() a bit. Drop a bunch of unused arguments from intel_create_renderbuffer() and introduce intel_renderbuffer_set_region() to set the region for a renderbuffer. --- src/mesa/drivers/dri/i915/intel_context.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 2cb57f3a92..ce77b57a3e 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -634,23 +634,23 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, struct intel_renderbuffer *irbStencil = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL); - if (intel_fb->color_rb[0] && !intel_fb->color_rb[0]->region) { - intel_region_reference(&intel_fb->color_rb[0]->region, - intel->front_region); + if (intel_fb->color_rb[0]) { + intel_renderbuffer_set_region(intel_fb->color_rb[0], + intel->front_region); } - if (intel_fb->color_rb[1] && !intel_fb->color_rb[1]->region) { - intel_region_reference(&intel_fb->color_rb[1]->region, - intel->back_region); + if (intel_fb->color_rb[1]) { + intel_renderbuffer_set_region(intel_fb->color_rb[1], + intel->back_region); } - if (intel_fb->color_rb[2] && !intel_fb->color_rb[2]->region) { - intel_region_reference(&intel_fb->color_rb[2]->region, - intel->third_region); + if (intel_fb->color_rb[2]) { + intel_renderbuffer_set_region(intel_fb->color_rb[2], + intel->third_region); } - if (irbDepth && !irbDepth->region) { - intel_region_reference(&irbDepth->region, intel->depth_region); + if (irbDepth) { + intel_renderbuffer_set_region(irbDepth, intel->depth_region); } - if (irbStencil && !irbStencil->region) { - intel_region_reference(&irbStencil->region, intel->depth_region); + if (irbStencil) { + intel_renderbuffer_set_region(irbStencil, intel->depth_region); } } -- cgit v1.2.3