diff options
author | Kristian Høgsberg <[email protected]> | 2008-01-09 16:55:32 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-01-09 20:43:18 -0500 |
commit | e131c46b20241737ceba4856dbe01dcca6dd2c03 (patch) | |
tree | 98b352d4a660cb6f96e9e9f809b372137f8a2e04 /src/mesa/drivers/dri/i915 | |
parent | 33c42c126272a4db879315127ef0fff711f1db8a (diff) |
[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.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 2cb57f3a925..ce77b57a3e6 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); } } |