[Mesa-dev] [PATCH] i915: remove unused fb_has_hiz vars only used in assertions

Brian Paul brian.e.paul at gmail.com
Fri Oct 7 09:41:40 PDT 2011


From: Brian Paul <brianp at vmware.com>

This previously generated unused variable warnings in non-debug builds.
---
 src/mesa/drivers/dri/i915/i830_vtbl.c |    3 +--
 src/mesa/drivers/dri/i915/i915_vtbl.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 7810f56..6ea0e6f 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -715,7 +715,6 @@ i830_update_draw_buffer(struct intel_context *intel)
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct intel_region *colorRegions[MAX_DRAW_BUFFERS], *depthRegion = NULL;
    struct intel_renderbuffer *irbDepth = NULL, *irbStencil = NULL;
-   bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
 
    if (!fb) {
       /* this can happen during the initial context initialization */
@@ -792,7 +791,7 @@ i830_update_draw_buffer(struct intel_context *intel)
 
    /* Check for depth fallback. */
    if (irbDepth && irbDepth->region) {
-      assert(!fb_has_hiz || irbDepth->Base.Format != MESA_FORMAT_S8_Z24);
+      assert(irbDepth->Base.Format != MESA_FORMAT_S8_Z24);
       FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE);
       depthRegion = irbDepth->region;
    } else if (irbDepth && !irbDepth->region) {
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 1e84c6d..f56aade 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -715,7 +715,6 @@ i915_update_draw_buffer(struct intel_context *intel)
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct intel_region *colorRegion = NULL, *depthRegion = NULL;
    struct intel_renderbuffer *irbDepth = NULL, *irbStencil = NULL;
-   bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
 
    if (!fb) {
       /* this can happen during the initial context initialization */
@@ -762,7 +761,7 @@ i915_update_draw_buffer(struct intel_context *intel)
 
    /* Check for depth fallback. */
    if (irbDepth && irbDepth->region) {
-      assert(!fb_has_hiz || irbDepth->Base.Format != MESA_FORMAT_S8_Z24);
+      assert(irbDepth->Base.Format != MESA_FORMAT_S8_Z24);
       FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE);
       depthRegion = irbDepth->region;
    } else if (irbDepth && !irbDepth->region) {
-- 
1.7.3.4



More information about the mesa-dev mailing list