[Mesa-dev] [PATCH 07/10] intel: Add function intel_renderbuffer_set_hiz_region()

Chad Versace chad at chad-versace.us
Sat Jun 4 17:45:40 PDT 2011


It's the analog of intel_renderbuffer_set_region(), but for the hiz region
of course.

CC: Eric Anholt <eric at anholt.net>
CC: Ian Romanick <idr at freedesktop.org>
CC: Kenneth Graunke <kenneth at whitecape.org>
CC: Kristian Høgsberg <krh at bitplanet.net>
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 src/mesa/drivers/dri/intel/intel_fbo.c |   12 ++++++++++++
 src/mesa/drivers/dri/intel/intel_fbo.h |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 7434e0e..83f622d 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 212dd9a..e9929b0 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);
-- 
1.7.5.2



More information about the mesa-dev mailing list