summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-06-07 11:48:05 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-06-09 13:47:14 -0700
commitb313439f26d316e98cae150889b1d2e5770fbdcf (patch)
tree33a366693a520bc7115b0aefe6d08b60c47ab24f
parentce52c1cc1827cd647e97045e7c1fb95a787f7c4f (diff)
shader_runner: Allow whitespace before [require] declarations
Currently any leading whitespace in a line of the require section results in that line being skipped. This is less than optimal because of generated tests that may want to make their templates more readable at the expense of having some odd indent in the produced shader. This is required to get the new, faster templates later in this series working. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
-rw-r--r--tests/shaders/shader_runner.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 56fd97ccc..564ae6375 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -813,6 +813,11 @@ process_requirement(const char *line)
return;
}
+ /* Consume any leading whitespace before requirements. This is
+ * important for generated test files that may have odd whitespace
+ */
+ line = eat_whitespace(line);
+
if (string_match("GL_", line)) {
strcpy_to_space(buffer, line);
piglit_require_extension(buffer);