i915: Silence warning: unused parameter warning in intel_bufferobj_buffer
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 23 Dec 2013 04:05:50 +0000 (20:05 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Jan 2014 19:40:46 +0000 (11:40 -0800)
intel_buffer_objects.c: In function 'old_intel_bufferobj_buffer':
intel_buffer_objects.c:471:17: warning: unused parameter 'flag' [-Wunused-parameter]

The parameter hasn't been used since the i915 and i965 drivers had their
breakup.  i965 got the flags, and i915 got to cry itself to sleep.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i915/intel_buffer_objects.c
src/mesa/drivers/dri/i915/intel_buffer_objects.h
src/mesa/drivers/dri/i915/intel_pixel_read.c

index a470e1ac4053172df98cba0b48e8b939611c6965..345db6dfe0fd336fa52f065e2036e26899879f7d 100644 (file)
@@ -467,8 +467,7 @@ intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj)
 
 drm_intel_bo *
 intel_bufferobj_buffer(struct intel_context *intel,
-                       struct intel_buffer_object *intel_obj,
-                      GLuint flag)
+                       struct intel_buffer_object *intel_obj)
 {
    if (intel_obj->source)
       release_buffer(intel_obj);
@@ -627,7 +626,7 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
 
    /* Otherwise, we have real BOs, so blit them. */
 
-   dst_bo = intel_bufferobj_buffer(intel, intel_dst, INTEL_WRITE_PART);
+   dst_bo = intel_bufferobj_buffer(intel, intel_dst);
    src_bo = intel_bufferobj_source(intel, intel_src, 64, &src_offset);
 
    intel_emit_linear_blit(intel,
@@ -671,7 +670,7 @@ intel_buffer_object_purgeable(struct gl_context * ctx,
    } else {
       /* XXX Create the buffer and madvise(MADV_DONTNEED)? */
       struct intel_context *intel = intel_context(ctx);
-      drm_intel_bo *bo = intel_bufferobj_buffer(intel, intel_obj, INTEL_READ);
+      drm_intel_bo *bo = intel_bufferobj_buffer(intel, intel_obj);
 
       return intel_buffer_purgeable(bo);
    }
index 5cf66c56a46904be995445ae2a43cb8cbce376bd..d2671f98c45f962472881b8630fcb3cc095e4bda 100644 (file)
@@ -58,8 +58,7 @@ struct intel_buffer_object
 /* Get the bm buffer associated with a GL bufferobject:
  */
 drm_intel_bo *intel_bufferobj_buffer(struct intel_context *intel,
-                                    struct intel_buffer_object *obj,
-                                    GLuint flag);
+                                    struct intel_buffer_object *obj);
 drm_intel_bo *intel_bufferobj_source(struct intel_context *intel,
                                     struct intel_buffer_object *obj,
                                     GLuint align,
index 7bf6c6cbf52f37a747eb121ab370c84091f67cfa..ce3ad253cb7a570549ca6eadaee4797a8c1f1371 100644 (file)
@@ -79,7 +79,6 @@ do_blit_readpixels(struct gl_context * ctx,
    struct intel_buffer_object *dst = intel_buffer_object(pack->BufferObj);
    GLuint dst_offset;
    drm_intel_bo *dst_buffer;
-   bool all;
    GLint dst_x, dst_y;
    GLuint dirty;
 
@@ -127,12 +126,7 @@ do_blit_readpixels(struct gl_context * ctx,
    intel_prepare_render(intel);
    intel->front_buffer_dirty = dirty;
 
-   all = (width * height * irb->mt->cpp == dst->Base.Size &&
-         x == 0 && dst_offset == 0);
-
-   dst_buffer = intel_bufferobj_buffer(intel, dst,
-                                      all ? INTEL_WRITE_FULL :
-                                      INTEL_WRITE_PART);
+   dst_buffer = intel_bufferobj_buffer(intel, dst);
 
    struct intel_mipmap_tree *pbo_mt =
       intel_miptree_create_for_bo(intel,