From: Ian Romanick Date: Mon, 23 Dec 2013 04:05:50 +0000 (-0800) Subject: i915: Silence warning: unused parameter warning in intel_bufferobj_buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4cd80119073fda0ebe5142a5f0fb92d25b769cb5;p=mesa.git i915: Silence warning: unused parameter warning in intel_bufferobj_buffer 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 Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i915/intel_buffer_objects.c b/src/mesa/drivers/dri/i915/intel_buffer_objects.c index a470e1ac405..345db6dfe0f 100644 --- a/src/mesa/drivers/dri/i915/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i915/intel_buffer_objects.c @@ -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); } diff --git a/src/mesa/drivers/dri/i915/intel_buffer_objects.h b/src/mesa/drivers/dri/i915/intel_buffer_objects.h index 5cf66c56a46..d2671f98c45 100644 --- a/src/mesa/drivers/dri/i915/intel_buffer_objects.h +++ b/src/mesa/drivers/dri/i915/intel_buffer_objects.h @@ -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, diff --git a/src/mesa/drivers/dri/i915/intel_pixel_read.c b/src/mesa/drivers/dri/i915/intel_pixel_read.c index 7bf6c6cbf52..ce3ad253cb7 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_read.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_read.c @@ -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,