Mesa (master): intel: Factor region updates out of intel_update_wrapper

Chad Versace chadversary at kemper.freedesktop.org
Fri Jun 24 21:48:50 UTC 2011


Module: Mesa
Branch: master
Commit: bffae4c9cd7df044cdbeeed1de257d720f1e76ac
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bffae4c9cd7df044cdbeeed1de257d720f1e76ac

Author: Chad Versace <chad at chad-versace.us>
Date:   Wed Jun 22 16:08:49 2011 -0700

intel: Factor region updates out of intel_update_wrapper

... and into new function intel_update_tex_wrapper_regions.

This prevents code duplication in the next commit.

Also add a note explaining that the hiz region is broken for mipmapped
depth textures.

Signed-off-by: Chad Versace <chad at chad-versace.us>

---

 src/mesa/drivers/dri/intel/intel_fbo.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index b431f53..fcbe451 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -497,6 +497,10 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
    intel_draw_buffer(ctx, fb);
 }
 
+static bool
+intel_update_tex_wrapper_regions(struct intel_context *intel,
+				 struct intel_renderbuffer *irb,
+				 struct intel_texture_image *intel_image);
 
 static GLboolean
 intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb, 
@@ -523,6 +527,20 @@ intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb,
    irb->Base.Delete = intel_delete_renderbuffer;
    irb->Base.AllocStorage = intel_nop_alloc_storage;
 
+   return intel_update_tex_wrapper_regions(intel, irb, intel_image);
+}
+
+/**
+ * FIXME: The handling of the hiz region is broken for mipmapped depth textures
+ * FIXME: because intel_finalize_mipmap_tree is unaware of it.
+ */
+static bool
+intel_update_tex_wrapper_regions(struct intel_context *intel,
+				 struct intel_renderbuffer *irb,
+				 struct intel_texture_image *intel_image)
+{
+   struct gl_texture_image *texImage = &intel_image->base;
+
    /* Point the renderbuffer's region to the texture's region. */
    if (irb->region != intel_image->mt->region) {
       intel_region_release(&irb->region);




More information about the mesa-commit mailing list