From patchwork Fri Jun 10 14:03:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Eric Pelloux-Prayer X-Patchwork-Id: 869782 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5AE3xX4002527 for ; Fri, 10 Jun 2011 14:04:20 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 687E9A09B1 for ; Fri, 10 Jun 2011 07:03:59 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-gx0-f177.google.com (mail-gx0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 898E3A0998 for ; Fri, 10 Jun 2011 07:03:23 -0700 (PDT) Received: by gxk2 with SMTP id 2so2304148gxk.36 for ; Fri, 10 Jun 2011 07:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=PvaXLPfXkbWbOSKjQ3D6ZJ96oIFTk/XUr9Ha/RKZ6/0=; b=fuibjJIOaYaMH7c8nGg4IyZrkD6Tg8ecETLFWWwMOZtEMd4tMVdcghy9FsmPARlMhd KuuQzSTH6+btujF6p1CHFvc9vYZdkMpUXVvqKHV0koUPW1CnG7DZb2jhzTs50uOPtJbq vhHG9e/OCXtNSpGnW8DerweUaU8PptMUbnv8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GQHlYmcgih8lTYwH/5QEuS4SLXyFwb6z0CL/q1NZ7eHjQ8hfrwPaU3zOzTURtLHIYK etR4iDyBH1aADJCy8JFj/ARGSiV0n//qcu5akSxWW7s5Cz0N7YKw5lqiwnBAuRrJukvH 1RRUWqQc+mGC9nJZC1h7guMcNBkyXVlWHmgv8= MIME-Version: 1.0 Received: by 10.91.63.24 with SMTP id q24mr1599522agk.163.1307714602958; Fri, 10 Jun 2011 07:03:22 -0700 (PDT) Received: by 10.90.119.15 with HTTP; Fri, 10 Jun 2011 07:03:22 -0700 (PDT) Date: Fri, 10 Jun 2011 16:03:22 +0200 Message-ID: Subject: [PATCH] r600g: remove useless call to u_upload_flush From: Pierre-Eric Pelloux-Prayer To: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Jun 2011 14:04:25 +0000 (UTC) u_upload_flush() is called each time r600_flush() is used. There is a comment specifically saying : /* XXX This shouldn't be really necessary, but removing it breaks some tests. * Needless buffer reallocations may significantly increase memory consumption, * so getting rid of this call is important. */ u_upload_flush(rctx->vbuf_mgr->uploader); I think the call to u_upload_flush() should be removed, unless someone knows a test case showing an issue ? I've done some regressions testing (piglit quick.tests, Unigine Heaven, Openarena, Lightsmark) and found almost no problem. The regressions reported by piglit concerned 3 tests : - fbo-sys-sub-blit - fp-fragment-position - kil-swizzle Which are all tests that fails sporadically (with or without patch applied) ; so this does not count as a regression. (All testing was done with HD4850) The simple attached patch removed function call + comment. Pierre-Eric From 4596e9040bde510fd974d500af69070341871b46 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 10 Jun 2011 15:45:01 +0200 Subject: [PATCH 2/2] r600g: remove useless call to u_upload_flush No regressions found with : - piglit (quick.tests) - Unigine Heaven - Lightsmark - openarena - Imprudence (Second Life fork) --- src/gallium/drivers/r600/r600_pipe.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index f924d79..ce2db88 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -138,11 +138,6 @@ static void r600_flush(struct pipe_context *ctx, dc++; #endif r600_context_flush(&rctx->ctx); - - /* XXX This shouldn't be really necessary, but removing it breaks some tests. - * Needless buffer reallocations may significantly increase memory consumption, - * so getting rid of this call is important. */ - u_upload_flush(rctx->vbuf_mgr->uploader); } static void r600_update_num_contexts(struct r600_screen *rscreen, int diff) -- 1.7.5.1