Add RS_TYPE_FLOAT_16 and allocation helpers for f16
http://b/24862914
- Add RS_TYPE_FLOAT_16 value to rs_data_type enum.
- Add helper functions to create f16 allocations.
Change-Id: I9e066070fd1be5fafb3137e23e7cd14a2a07e9ed
diff --git a/api/rs_allocation_create.spec b/api/rs_allocation_create.spec
index ea69455..14a44d6 100644
--- a/api/rs_allocation_create.spec
+++ b/api/rs_allocation_create.spec
@@ -169,10 +169,9 @@
test: none
end:
-# Bug: 24862914: Add f16 to all functions below once the bug is fixed
function: rsCreateAllocation_#1
version: UNRELEASED
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
arg: uint32_t dimY
@@ -187,7 +186,7 @@
function: rsCreateAllocation_#2#1
version: UNRELEASED
w: 2, 3, 4
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
arg: uint32_t dimY
@@ -201,7 +200,7 @@
function: rsCreateAllocation_#1
version: UNRELEASED
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
arg: uint32_t dimY
@@ -215,7 +214,7 @@
function: rsCreateAllocation_#2#1
version: UNRELEASED
w: 2, 3, 4
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
arg: uint32_t dimY
@@ -228,7 +227,7 @@
function: rsCreateAllocation_#1
version: UNRELEASED
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
inline:
@@ -241,7 +240,7 @@
function: rsCreateAllocation_#2#1
version: UNRELEASED
w: 2, 3, 4
-t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, f64
ret: rs_allocation
arg: uint32_t dimX
inline:
diff --git a/api/rs_object_types.spec b/api/rs_object_types.spec
index 40aa12a..3f18953 100644
--- a/api/rs_object_types.spec
+++ b/api/rs_object_types.spec
@@ -119,7 +119,8 @@
version: 16
enum:
value: RS_TYPE_NONE = 0, "Element is a complex type, i.e. a struct."
-value: RS_TYPE_FLOAT_32 = 2, "A 32 bit float point value."
+value: RS_TYPE_FLOAT_16 = 1, "A 16 bit floating point value."
+value: RS_TYPE_FLOAT_32 = 2, "A 32 bit floating point value."
value: RS_TYPE_FLOAT_64 = 3, "A 64 bit floating point value."
value: RS_TYPE_SIGNED_8 = 4, "An 8 bit signed integer."
value: RS_TYPE_SIGNED_16 = 5, "A 16 bit signed integer."