From 6faa4d20c50c2f233cc3f4ba9e32f2678db8ba16 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Wed, 13 May 2015 13:21:30 -0700 Subject: Fix issues found during CTS testing of FP16 bug 20822382 This corrects a copy&paste error placing F16 into F32. Fixes an error disallowing vectors of fp16 types. Change-Id: I34be1aa9a323d61a7121581ab9599d2c2d32dd42 --- rs/java/android/renderscript/Element.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rs') diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java index 4b3e30f..6efb6d6 100644 --- a/rs/java/android/renderscript/Element.java +++ b/rs/java/android/renderscript/Element.java @@ -536,8 +536,8 @@ public class Element extends BaseObj { } public static Element F16_3(RenderScript rs) { - if(rs.mElement_FLOAT_3 == null) { - rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_16, 3); + if(rs.mElement_HALF_3 == null) { + rs.mElement_HALF_3 = createVector(rs, DataType.FLOAT_16, 3); } return rs.mElement_HALF_3; } @@ -911,6 +911,7 @@ public class Element extends BaseObj { switch (dt) { // Support only primitive integer/float/boolean types as vectors. + case FLOAT_16: case FLOAT_32: case FLOAT_64: case SIGNED_8: -- cgit v1.1