i965: Drop brw_bo_alloc in ARB_indirect_parameters implementation.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Oct 2017 17:19:21 +0000 (10:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Oct 2017 19:22:29 +0000 (12:22 -0700)
The original implementation allocated a new BO here, but we decided to
switch to intel_upload_space, which returns a reference to the current
upload BO.  We accidentally kept the brw_bo_alloc, even though it's no
longer necessary - intel_upload_space will immediately unreference it,
causing us to allocate and immediately free a buffer.

Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
src/mesa/drivers/dri/i965/brw_draw.c

index d6aa95b6f60b904f3d2a27c629ae334f7be08dbe..0364d442f21fad9da04548048066b16be4e85756 100644 (file)
@@ -903,7 +903,7 @@ brw_draw_prims(struct gl_context *ctx,
    for (i = 0; i < nr_prims; i++) {
       /* Implementation of ARB_indirect_parameters via predicates */
       if (brw->draw.draw_params_count_bo) {
-         struct brw_bo *draw_id_bo = brw_bo_alloc(brw->bufmgr, "draw_id", 4, 4);
+         struct brw_bo *draw_id_bo = NULL;
          uint32_t draw_id_offset;
 
          intel_upload_data(brw, &prims[i].draw_id, 4, 4, &draw_id_bo,