From patchwork Thu Jan 17 23:09:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14107 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DC53523E27 for ; Thu, 17 Jan 2013 23:09:47 +0000 (UTC) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9486EA187C5 for ; Thu, 17 Jan 2013 23:09:47 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id p16so3080598vcq.39 for ; Thu, 17 Jan 2013 15:09:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=+Vn+FaavMfH11LpHBG1JQmYU+8Raj7m8o/6r/WlZKKE=; b=XvDIUwXNw0qssryMI9DzSeH/2CnriWv2qHI+S/JsTYsAAbF3LgAaasLL/NE9sMuQGP +OaNrwc3/uqiuRaTXTbr0oneWkCXrZkUl/kg+PNiur3u5r8ny3QrB3WrwbYgrKsmwYTN faQIiEaZbr8Lu+ht0kLyDN+69Q21ASlyfxCRrHP2pSR/QCVihvswkWt9jSOYwIJngju2 ZGKXSw9mjMTkGm+oelWXBo+3lm/helTNtnd16GYg3CJWFo8CsU2Rae/VIY7+agMc0XN/ p/iQjhXyBp4sFo4kAqvAtF9Gl72d7+MvtjB1Jyj0I6YbW/50rjRerXsYquz5mGtULYEY sBTw== X-Received: by 10.220.39.69 with SMTP id f5mr2623182vce.45.1358464187115; Thu, 17 Jan 2013 15:09:47 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp56342veb; Thu, 17 Jan 2013 15:09:45 -0800 (PST) X-Received: by 10.50.17.230 with SMTP id r6mr492418igd.1.1358464184430; Thu, 17 Jan 2013 15:09:44 -0800 (PST) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) by mx.google.com with ESMTPS id ul14si569642igb.30.2013.01.17.15.09.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 15:09:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.175 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.223.175; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.223.175 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) smtp.mail=tom.gall@linaro.org Received: by mail-ie0-f175.google.com with SMTP id qd14so5487491ieb.20 for ; Thu, 17 Jan 2013 15:09:44 -0800 (PST) X-Received: by 10.50.202.3 with SMTP id ke3mr430726igc.49.1358464184175; Thu, 17 Jan 2013 15:09:44 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id kp4sm524830igc.1.2013.01.17.15.09.42 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 15:09:43 -0800 (PST) From: Tom Gall To: patches@linaro.org Cc: Tom Gall Subject: [PATCH 2/2] shader_runner optimization Date: Thu, 17 Jan 2013 17:09:30 -0600 Message-Id: <1358464170-10234-2-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358464170-10234-1-git-send-email-tom.gall@linaro.org> References: <1358464170-10234-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQmSX5pEPl4mn34sdytrafpt5CDgKvnT2AdsHMbJJNBW58Oc0jtyrpR1XczlZzw8qPUBteKJ When shader_runner parses the shader_test data file, add an optimization such that after the [required] section is left to no longer parse the rest of the file. Signed-off-by: Tom Gall --- tests/shaders/shader_runner.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 8dfeb2a..6033bda 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -869,7 +869,10 @@ parse_required_versions(struct requirement_parse_results *results, while (line[0] != '\0') { if (line[0] == '[') - in_requirement_section = false; + if (in_requirement_section) + break; + else + in_requirement_section = false; if (!in_requirement_section) { if (string_match("[require]", line)) {