[Mesa-dev] [PATCH 05/12] intel: Fix an unused variable warning in the release build.

Eric Anholt eric at anholt.net
Thu Apr 11 11:06:32 PDT 2013


---
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 772c393..f9768df 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -484,7 +484,6 @@ intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
 {
    struct intel_mipmap_tree *singlesample_mt = NULL;
    struct intel_mipmap_tree *multisample_mt = NULL;
-   GLenum base_format = _mesa_get_format_base_format(format);
 
    /* Only the front and back buffers, which are color buffers, are shared
     * through DRI2.
@@ -492,7 +491,8 @@ intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
    assert(dri_attachment == __DRI_BUFFER_BACK_LEFT ||
           dri_attachment == __DRI_BUFFER_FRONT_LEFT ||
           dri_attachment == __DRI_BUFFER_FAKE_FRONT_LEFT);
-   assert(base_format == GL_RGB || base_format == GL_RGBA);
+   assert(_mesa_get_format_base_format(format) == GL_RGB ||
+          _mesa_get_format_base_format(format) == GL_RGBA);
 
    singlesample_mt = intel_miptree_create_for_region(intel, GL_TEXTURE_2D,
                                                      format, region);
-- 
1.7.10.4



More information about the mesa-dev mailing list