COMPMID-556 - Fix Warp Perspective validation

Change-Id: I6504fb1e2d3d2b454a043d7157112891cef272a3
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95045
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/tests/validation/fixtures/WarpPerspectiveFixture.h b/tests/validation/fixtures/WarpPerspectiveFixture.h
index c77efbd..1a6d6c0 100644
--- a/tests/validation/fixtures/WarpPerspectiveFixture.h
+++ b/tests/validation/fixtures/WarpPerspectiveFixture.h
@@ -70,9 +70,9 @@
 
 protected:
     template <typename U>
-    void fill(U &&tensor, int i = 0)
+    void fill(U &&tensor)
     {
-        library->fill_tensor_uniform(tensor, i);
+        library->fill_tensor_uniform(tensor, 0);
     }
 
     TensorType compute_target(const TensorShape &shape, const TensorShape &vmask_shape, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value,
@@ -112,19 +112,21 @@
 
         // Create reference
         SimpleTensor<T> src{ shape, data_type };
-        SimpleTensor<T> valid_mask{ vmask_shape, data_type };
+
+        // Create the valid mask Tensor
+        _valid_mask = SimpleTensor<T>(shape, data_type);
 
         // Fill reference
-        fill(src, 0);
-        fill(valid_mask, 1);
+        fill(src);
 
         // Compute reference
-        return reference::warp_perspective<T>(src, valid_mask, matrix, policy, border_mode, constant_border_value);
+        return reference::warp_perspective<T>(src, _valid_mask, matrix, policy, border_mode, constant_border_value);
     }
 
     TensorType      _target{};
     SimpleTensor<T> _reference{};
     BorderMode      _border_mode{};
+    SimpleTensor<T> _valid_mask{};
 };
 } // namespace validation
 } // namespace test