summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-11-13 23:02:04 -0800
committerChad Versace <[email protected]>2011-11-21 16:58:31 -0800
commit7e9b3c098c58af49a809afbc17d508f23eab21c2 (patch)
treef2d1d2d4625ec78ae034c0a2ef5fd61811821077 /src/mesa/drivers
parent190aec75a4362b56b9b311975a777c56e8e6c67d (diff)
intel: Temporarily disable HiZ for textures
A great refactor thrashing begins after this commit for HiZ and separate stencil. Removing code for texture HiZ will make that refactoring easier, because then we don't have to maintain that code during the refactor. To disable HiZ for textures, I've removed the hook in intel_update_wrapper() that allocates a HiZ buffer when attaching a depth texture to a framebuffer. HiZ was broken for textures anyway, so there's no regression here. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c62
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 1bd16f06a38..16b49ae311d 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -927,15 +927,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;
@@ -961,70 +955,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.