[Mesa-dev] [PATCH 1/5] intel: Temporarily disable HiZ for textures

Chad Versace chad at chad-versace.us
Thu Oct 27 18:55:47 PDT 2011


A great refactor thrashing begins after this commit. Removing code for
texture HiZ will make that refactoring easier.

HiZ was broken for textures anyway, so there's no regression here.

Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 src/mesa/drivers/dri/intel/intel_fbo.c |   62 ++------------------------------
 1 files changed, 3 insertions(+), 59 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 4537f1f..7a24d06 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -473,15 +473,9 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
 }
 
 static bool
-intel_update_tex_wrapper_regions(struct intel_context *intel,
-				 struct intel_renderbuffer *irb,
-				 struct intel_texture_image *intel_image);
-
-static bool
 intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb, 
 		     struct gl_texture_image *texImage)
 {
-   struct intel_context *intel = intel_context(ctx);
    struct intel_texture_image *intel_image = intel_texture_image(texImage);
    int width, height, depth;
 
@@ -507,70 +501,20 @@ intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb,
 
    if (intel_image->stencil_rb) {
       /*  The tex image has packed depth/stencil format, but is using separate
-       * stencil. */
-
-      bool ok;
-      struct intel_renderbuffer *depth_irb =
-	 intel_renderbuffer(intel_image->depth_rb);
-
-      /* Update the hiz region if necessary. */
-      ok =  intel_update_tex_wrapper_regions(intel, depth_irb, intel_image);
-      if (!ok) {
-	 return false;
-      }
-
-      /* The tex image shares its embedded depth and stencil renderbuffers with
-       * the renderbuffer wrapper. */
+       *  stencil. It shares its embedded depth and stencil renderbuffers with
+       *  the renderbuffer wrapper.
+       */
       _mesa_reference_renderbuffer(&irb->wrapped_depth,
 				   intel_image->depth_rb);
       _mesa_reference_renderbuffer(&irb->wrapped_stencil,
 				   intel_image->stencil_rb);
-
-      return true;
    } else {
-      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_renderbuffer *rb = &irb->Base;
-
-   /* Point the renderbuffer's region to the texture's region. */
-   if (irb->region != intel_image->mt->region) {
       intel_region_reference(&irb->region, intel_image->mt->region);
    }
 
-   /* Allocate the texture's hiz region if necessary. */
-   if (intel->vtbl.is_hiz_depth_format(intel, rb->Format)
-       && !intel_image->mt->hiz_region) {
-      intel_image->mt->hiz_region =
-         intel_region_alloc(intel->intelScreen,
-                            I915_TILING_Y,
-                            _mesa_get_format_bytes(rb->Format),
-                            rb->Width,
-                            rb->Height,
-                            true);
-      if (!intel_image->mt->hiz_region)
-         return false;
-   }
-
-   /* Point the renderbuffer's hiz region to the texture's hiz region. */
-   if (irb->hiz_region != intel_image->mt->hiz_region) {
-      intel_region_reference(&irb->hiz_region, intel_image->mt->hiz_region);
-   }
-
    return true;
 }
 
-
 /**
  * When glFramebufferTexture[123]D is called this function sets up the
  * gl_renderbuffer wrapper around the texture image.
-- 
1.7.6.4



More information about the mesa-dev mailing list