[Piglit] [PATCH 2/2] shader_runner optimization
Tom Gall
tom.gall at linaro.org
Thu Jan 17 15:08:54 PST 2013
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 at linaro.org>
---
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)) {
--
1.7.10.4
More information about the Piglit
mailing list