[3/4] gen_variable_index_read_tests: simplify some things

Submitted by Dylan Baker on April 13, 2015, 11:18 p.m.

Details

Message ID 1428967102-8930-4-git-send-email-baker.dylan.c@gmail.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Dylan Baker April 13, 2015, 11:18 p.m.
This makes the port a little less naive than it was before.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 .../templates/gen_variable_index_read_tests/helpers.mako          | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Patch hide | download patch | download mbox

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 dcbcb92..d75d936 100644
--- a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
+++ b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako
@@ -141,13 +141,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>