[Mesa-dev] [PATCH 06/20] intel: Silence "warning: unused parameter ‘fb’"

Ian Romanick idr at freedesktop.org
Mon Aug 29 14:58:56 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

The gl_framebuffer was not used in intel_draw_buffer, so remove it.
---
 src/mesa/drivers/dri/intel/intel_buffers.c |    2 +-
 src/mesa/drivers/dri/intel/intel_buffers.h |    2 +-
 src/mesa/drivers/dri/intel/intel_context.c |    4 ++--
 src/mesa/drivers/dri/intel/intel_fbo.c     |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index fccdcbd..8341cbf 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -97,7 +97,7 @@ intelDrawBuffer(struct gl_context * ctx, GLenum mode)
 	 dri2InvalidateDrawable(intel->driContext->driDrawablePriv);
    }
 
-   intel_draw_buffer(ctx, ctx->DrawBuffer);
+   intel_draw_buffer(ctx);
 }
 
 
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.h b/src/mesa/drivers/dri/intel/intel_buffers.h
index a7e7797..896ec5a 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.h
+++ b/src/mesa/drivers/dri/intel/intel_buffers.h
@@ -43,7 +43,7 @@ extern struct intel_region *intel_drawbuf_region(struct intel_context *intel);
 extern void intel_check_front_buffer_rendering(struct intel_context *intel);
 
 static inline void
-intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb)
+intel_draw_buffer(struct gl_context * ctx)
 {
    struct intel_context *intel = intel_context(ctx);
 
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 14342ef..6ba7e10 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -409,7 +409,7 @@ intel_prepare_render(struct intel_context *intel)
    if (drawable && drawable->dri2.stamp != driContext->dri2.draw_stamp) {
       if (drawable->lastStamp != drawable->dri2.stamp)
 	 intel_update_renderbuffers(driContext, drawable);
-      intel_draw_buffer(&intel->ctx, intel->ctx.DrawBuffer);
+      intel_draw_buffer(&intel->ctx);
       driContext->dri2.draw_stamp = drawable->dri2.stamp;
    }
 
@@ -979,7 +979,7 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
        * is NULL at that point.  We can't call _mesa_makecurrent()
        * first, since we need the buffer size for the initial
        * viewport.  So just call intel_draw_buffer() again here. */
-      intel_draw_buffer(&intel->ctx, intel->ctx.DrawBuffer);
+      intel_draw_buffer(&intel->ctx);
    }
    else {
       _mesa_make_current(NULL, NULL, NULL);
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 754f9f2..8421b69 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -437,7 +437,7 @@ intel_bind_framebuffer(struct gl_context * ctx, GLenum target,
                        struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
 {
    if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {
-      intel_draw_buffer(ctx, fb);
+      intel_draw_buffer(ctx);
    }
    else {
       /* don't need to do anything if target == GL_READ_FRAMEBUFFER_EXT */
@@ -458,7 +458,7 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
    intel_flush(ctx);
 
    _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
-   intel_draw_buffer(ctx, fb);
+   intel_draw_buffer(ctx);
 }
 
 static bool
@@ -749,7 +749,7 @@ intel_render_texture(struct gl_context * ctx,
    }
 #endif
    /* update drawing region, etc */
-   intel_draw_buffer(ctx, fb);
+   intel_draw_buffer(ctx);
 }
 
 
-- 
1.7.4.4



More information about the mesa-dev mailing list