summaryrefslogtreecommitdiff
path: root/libs/rs/rsScript.h
diff options
context:
space:
mode:
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
commite4a06c5fc738bf219f2a495e12a637b2d0871651 (patch)
treea7102d6914154f456a57403ae690d9d2f8979aae /libs/rs/rsScript.h
parentce06ebfda4bd7c511cef3d98aacf7291a743ea46 (diff)
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.h49
1 files changed, 39 insertions, 10 deletions
diff --git a/libs/rs/rsScript.h b/libs/rs/rsScript.h
index bad095bcfcdf..671fbe6746f4 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;