summaryrefslogtreecommitdiff
path: root/libs/rs/rsContext.h
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2010-02-12 11:27:01 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2010-02-12 11:27:01 -0800
commit79b646ffe51c532f00b69dc4967ee51ca28986cf (patch)
tree64dc779a8ee4d21f322499bbefa11e5972741be3 /libs/rs/rsContext.h
parent1e90ab542d675616e9370ab7e5add99d7af12587 (diff)
parent0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8 (diff)
am 0b9bbb6d: DO NOT MERGE. Merge Froyo renderscript to Eclair to support live wallpapers on droid. This gives the necessary CPU reduction to allow the wallpapers to work on the slower CPU.
Merge commit '0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8' into eclair-plus-aosp * commit '0b9bbb6dc5d7dabecf23e8c6bb4a267ba8c34fe8': DO NOT MERGE. Merge Froyo renderscript to Eclair to support live wallpapers on droid. This gives the necessary CPU reduction to allow the wallpapers to work on the slower CPU.
Diffstat (limited to 'libs/rs/rsContext.h')
-rw-r--r--libs/rs/rsContext.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 1770ee69912c..2edd16d6e634 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -37,6 +37,8 @@
#include "rsProgramFragmentStore.h"
#include "rsProgramRaster.h"
#include "rsProgramVertex.h"
+#include "rsShaderCache.h"
+#include "rsVertexArray.h"
#include "rsgApiStructs.h"
#include "rsLocklessFifo.h"
@@ -72,8 +74,10 @@ public:
ProgramRasterState mStateRaster;
ProgramVertexState mStateVertex;
LightState mStateLight;
+ VertexArrayState mStateVertexArray;
ScriptCState mScriptC;
+ ShaderCache mShaderCache;
void swapBuffers();
void setRootScript(Script *);
@@ -90,7 +94,7 @@ public:
const ProgramVertex * getVertex() {return mVertex.get();}
void setupCheck();
- void allocationCheck(const Allocation *);
+ bool checkDriver() const {return mEGL.mSurface != 0;}
void pause();
void resume();
@@ -101,7 +105,6 @@ public:
void removeName(ObjectBase *obj);
ObjectBase * lookupName(const char *name) const;
void appendNameDefines(String8 *str) const;
- void appendVarDefines(String8 *str) const;
uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait);
bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace);
@@ -123,14 +126,6 @@ public:
return mStateRaster.mDefault.get();
}
- void addInt32Define(const char* name, int32_t value) {
- mInt32Defines.add(String8(name), value);
- }
-
- void addFloatDefine(const char* name, float value) {
- mFloatDefines.add(String8(name), value);
- }
-
uint32_t getWidth() const {return mEGL.mWidth;}
uint32_t getHeight() const {return mEGL.mHeight;}
@@ -160,9 +155,11 @@ public:
bool mLogTimes;
bool mLogScripts;
bool mLogObjects;
+ bool mLogShaders;
} props;
void dumpDebug() const;
+ void checkError(const char *) const;
mutable const ObjectBase * mObjHead;
@@ -190,6 +187,15 @@ protected:
uint32_t mMajorVersion;
uint32_t mMinorVersion;
+ int32_t mMaxVaryingVectors;
+ int32_t mMaxTextureImageUnits;
+
+ int32_t mMaxFragmentTextureImageUnits;
+ int32_t mMaxFragmentUniformVectors;
+
+ int32_t mMaxVertexAttribs;
+ int32_t mMaxVertexUniformVectors;
+ int32_t mMaxVertexTextureUnits;
} mGL;
uint32_t mWidth;
@@ -224,7 +230,7 @@ protected:
private:
Context();
- void initEGL();
+ void initEGL(bool useGL2);
void deinitEGL();
uint32_t runRootScript();
@@ -234,8 +240,6 @@ private:
Surface *mWndSurface;
Vector<ObjectBase *> mNames;
- KeyedVector<String8,int> mInt32Defines;
- KeyedVector<String8,float> mFloatDefines;
uint64_t mTimers[_RS_TIMER_TOTAL];
Timers mTimerActive;