[Piglit] [PATCH 3/4] gen_variable_index_read_tests: simplify some things

Dylan Baker baker.dylan.c at gmail.com
Fri Mar 27 12:01:26 PDT 2015


This makes the port a little less naive than it did before.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>

 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
index 7c9305f..da5d963 100644
--- a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
+++ b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
@@ -121,13 +121,7 @@ void main()
        *     written."
        */
     % endif
-    ## TODO: Could probably simplify this with the use of params.row
-    % if params.expect_type == 'float':
-      color = (m${params.idx}[${params.col}][row] == expect) \
-    % else:
-      color = (m${params.idx}[${params.col}] == expect) \
-    % endif
-    ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+    color = (m${params.idx}[${params.col}]${params.row} == expect) ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
   % endif
 }
 </%def>
-- 
2.3.4



More information about the Piglit mailing list