From 84294fe26ca5860c34e6541f633be4d093ab57f2 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 31 May 2011 14:18:22 -0700 Subject: [PATCH] intel: Add function intel_renderbuffer_set_hiz_region() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's the analog of intel_renderbuffer_set_region(), but for the hiz region of course. CC: Ian Romanick CC: Kristian Høgsberg Acked-by: Eric Anholt Reviewed-by: Kenneth Graunke Signed-off-by: Chad Versace --- src/mesa/drivers/dri/intel/intel_fbo.c | 12 ++++++++++++ src/mesa/drivers/dri/intel/intel_fbo.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 7434e0efff6..83f622d437e 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -321,6 +321,18 @@ intel_renderbuffer_set_region(struct intel_context *intel, } +void +intel_renderbuffer_set_hiz_region(struct intel_context *intel, + struct intel_renderbuffer *rb, + struct intel_region *region) +{ + struct intel_region *old = rb->hiz_region; + rb->hiz_region = NULL; + intel_region_reference(&rb->hiz_region, region); + intel_region_release(&old); +} + + /** * Create a new intel_renderbuffer which corresponds to an on-screen window, * not a user-created renderbuffer. diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h index 212dd9aadc8..e9929b095ff 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.h +++ b/src/mesa/drivers/dri/intel/intel_fbo.h @@ -113,6 +113,11 @@ intel_renderbuffer_set_region(struct intel_context *intel, struct intel_renderbuffer *irb, struct intel_region *region); +extern void +intel_renderbuffer_set_hiz_region(struct intel_context *intel, + struct intel_renderbuffer *rb, + struct intel_region *region); + extern struct intel_renderbuffer * intel_create_renderbuffer(gl_format format); -- 2.30.2