summaryrefslogtreecommitdiff
path: root/rs_hal.h
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2014-06-17 12:06:06 -0700
committerTim Murray <timmurray@google.com>2014-07-08 15:59:16 -0700
commita36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12 (patch)
tree8b62d216582d173b9eaf0fd731ab388a2f7432e7 /rs_hal.h
parent60506d94c399dea8b6325000be27b07fed67852a (diff)
downloadrs-a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12.tar.gz
Add 64bit large object support
Add HAL hooks for filling in LO fields. Change-Id: Ib9bdee714a062de519d2a9708c1016404a1b11a4 Conflicts: driver/rsdBcc.cpp driver/rsdCore.cpp rsAllocation.h rs_hal.h
Diffstat (limited to 'rs_hal.h')
-rw-r--r--rs_hal.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/rs_hal.h b/rs_hal.h
index 467c815b..5eec3b1b 100644
--- a/rs_hal.h
+++ b/rs_hal.h
@@ -45,6 +45,41 @@ class Mesh;
class Sampler;
class FBOCache;
+/**
+ * Define the internal object types. This ia a mirror of the
+ * definition in rs_types.rsh except with the p value typed
+ * correctly.
+ *
+ * p = pointer to internal object implementation
+ * r = reserved by libRS runtime
+ * v1 = Mirror of p->mHal.drv
+ * v2 = reserved for use by vendor drivers
+ */
+
+#ifndef __LP64__
+#define RS_BASE_OBJ(_t_) typedef struct { const _t_* p; } __attribute__((packed, aligned(4)))
+#else
+#define RS_BASE_OBJ(_t_) typedef struct { const _t_* p; const void* r; const void* v1; const void* v2; }
+#endif
+
+RS_BASE_OBJ(Element) rs_element;
+RS_BASE_OBJ(Type) rs_type;
+RS_BASE_OBJ(Allocation) rs_allocation;
+RS_BASE_OBJ(Sampler) rs_sampler;
+RS_BASE_OBJ(Script) rs_script;
+RS_BASE_OBJ(ScriptGroup) rs_script_group;
+
+#ifndef __LP64__
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_mesh;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_path;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_program_fragment;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_program_vertex;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_program_raster;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_program_store;
+typedef struct { const int* p; } __attribute__((packed, aligned(4))) rs_font;
+#endif // __LP64__
+
+
typedef void *(*RsHalSymbolLookupFunc)(void *usrptr, char const *symbolName);
/**
@@ -122,6 +157,7 @@ typedef struct {
const void * usr,
size_t usrLen,
const RsScriptCall *sc);
+ void (*updateCachedObject)(const Context *rsc, const Script *, rs_script *obj);
} script;
struct {
@@ -203,6 +239,8 @@ typedef struct {
const void *data, uint32_t elementOff, size_t sizeBytes);
void (*generateMipmaps)(const Context *rsc, const Allocation *alloc);
+
+ void (*updateCachedObject)(const Context *rsc, const Allocation *alloc, rs_allocation *obj);
} allocation;
struct {
@@ -251,6 +289,7 @@ typedef struct {
struct {
bool (*init)(const Context *rsc, const Sampler *m);
void (*destroy)(const Context *rsc, const Sampler *m);
+ void (*updateCachedObject)(const Context *rsc, const Sampler *s, rs_sampler *obj);
} sampler;
struct {
@@ -267,8 +306,21 @@ typedef struct {
const ScriptKernelID *kid, Allocation *);
void (*execute)(const Context *rsc, const ScriptGroup *sg);
void (*destroy)(const Context *rsc, const ScriptGroup *sg);
+ void (*updateCachedObject)(const Context *rsc, const ScriptGroup *sg, rs_script_group *obj);
} scriptgroup;
+ struct {
+ bool (*init)(const Context *rsc, const Type *m);
+ void (*destroy)(const Context *rsc, const Type *m);
+ void (*updateCachedObject)(const Context *rsc, const Type *s, rs_type *obj);
+ } type;
+
+ struct {
+ bool (*init)(const Context *rsc, const Element *m);
+ void (*destroy)(const Context *rsc, const Element *m);
+ void (*updateCachedObject)(const Context *rsc, const Element *s, rs_element *obj);
+ } element;
+
void (*finish)(const Context *rsc);
} RsdHalFunctions;