diff options
| author | Jason Sams <rjsams@android.com> | 2011-03-16 16:29:28 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2011-03-17 16:13:03 -0700 |
| commit | e4a06c5fc738bf219f2a495e12a637b2d0871651 (patch) | |
| tree | a7102d6914154f456a57403ae690d9d2f8979aae /libs/rs/rsScript.h | |
| parent | ce06ebfda4bd7c511cef3d98aacf7291a743ea46 (diff) | |
| download | frameworks_base-e4a06c5fc738bf219f2a495e12a637b2d0871651.zip frameworks_base-e4a06c5fc738bf219f2a495e12a637b2d0871651.tar.gz frameworks_base-e4a06c5fc738bf219f2a495e12a637b2d0871651.tar.bz2 | |
Start seperating out RS compute implementation. Create hal
layer to seperate from runtime.
Change-Id: Idf5c1261be4131690d25c15948e98324e979b4f9
Diffstat (limited to 'libs/rs/rsScript.h')
| -rw-r--r-- | libs/rs/rsScript.h | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/libs/rs/rsScript.h b/libs/rs/rsScript.h index bad095b..671fbe6 100644 --- a/libs/rs/rsScript.h +++ b/libs/rs/rsScript.h @@ -31,6 +31,45 @@ class ProgramStore; class Script : public ObjectBase { public: + struct Hal { + void * drv; + + struct State { + ObjectBaseRef<const Type> type; + void * mallocPtr; + + uint32_t usageFlags; + RsAllocationMipmapControl mipmapControl; + + // Cached fields from the Type and Element + // to prevent pointer chasing in critical loops. + uint32_t dimensionX; + uint32_t dimensionY; + uint32_t dimensionZ; + uint32_t elementSizeBytes; + bool hasMipmaps; + bool hasFaces; + bool hasReferences; + }; + State state; + + struct DriverInfo { + int mVersionMajor; + int mVersionMinor; + + size_t exportedVariableCount; + size_t exportedFunctionCount; + size_t exportedPragmaCount; + char const **exportedPragmaKeyList; + char const **exportedPragmaValueList; + + int (* root)(); + bool isThreadable; + }; + DriverInfo info; + }; + Hal mHal; + typedef void (* InvokeFunc_t)(void); Script(Context *); @@ -45,16 +84,6 @@ public: ObjectBaseRef<ProgramFragment> mFragment; ObjectBaseRef<ProgramRaster> mRaster; ObjectBaseRef<ProgramStore> mFragmentStore; - - uint32_t mInvokeFunctionCount; - InvokeFunc_t *mInvokeFunctions; - uint32_t mFieldCount; - void ** mFieldAddress; - - char * mScriptText; - uint32_t mScriptTextLength; - - bool mIsThreadable; }; Enviroment_t mEnviroment; |
