diff mbox

[2/2] shader_runner optimization

Message ID 1358464170-10234-2-git-send-email-tom.gall@linaro.org
State Superseded
Headers show

Commit Message

Tom Gall Jan. 17, 2013, 11:09 p.m. UTC
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 <tom.gall@linaro.org>
---
 tests/shaders/shader_runner.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

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)) {