diff options
author | Jason Sams <jsams@google.com> | 2014-06-17 12:06:06 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2014-07-08 15:59:16 -0700 |
commit | a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12 (patch) | |
tree | 8b62d216582d173b9eaf0fd731ab388a2f7432e7 /rs_hal.h | |
parent | 60506d94c399dea8b6325000be27b07fed67852a (diff) | |
download | rs-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.h | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -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; |