Rename ProgramFragmentStore to ProgramStore.
Change-Id: Ia8ad9ac856944838ced38a2f1e8f07387050bdfd
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk
index 95571e7..f5cfe86 100644
--- a/libs/rs/Android.mk
+++ b/libs/rs/Android.mk
@@ -91,7 +91,7 @@
rsNoise.cpp \
rsProgram.cpp \
rsProgramFragment.cpp \
- rsProgramFragmentStore.cpp \
+ rsProgramStore.cpp \
rsProgramRaster.cpp \
rsProgramVertex.cpp \
rsSampler.cpp \
diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h
index 7415ba9..5e246ce 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -44,7 +44,7 @@
typedef void * RsProgram;
typedef void * RsProgramVertex;
typedef void * RsProgramFragment;
-typedef void * RsProgramFragmentStore;
+typedef void * RsProgramStore;
typedef void * RsProgramRaster;
typedef void (* RsBitmapCallback_t)(void *);
diff --git a/libs/rs/RenderScriptEnv.h b/libs/rs/RenderScriptEnv.h
index 99b8c04..144e539 100644
--- a/libs/rs/RenderScriptEnv.h
+++ b/libs/rs/RenderScriptEnv.h
@@ -12,7 +12,7 @@
typedef void * RsSimpleMesh;
typedef void * RsType;
typedef void * RsProgramFragment;
-typedef void * RsProgramFragmentStore;
+typedef void * RsProgramStore;
typedef void * RsLight;
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index a589d5b..9c57e66 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -4,8 +4,8 @@
param RsScript sampler
}
-ContextBindProgramFragmentStore {
- param RsProgramFragmentStore pgm
+ContextBindProgramStore {
+ param RsProgramStore pgm
}
ContextBindProgramFragment {
@@ -342,37 +342,37 @@
param int32_t value
}
-ProgramFragmentStoreBegin {
+ProgramStoreBegin {
param RsElement in
param RsElement out
}
-ProgramFragmentStoreColorMask {
+ProgramStoreColorMask {
param bool r
param bool g
param bool b
param bool a
}
-ProgramFragmentStoreBlendFunc {
+ProgramStoreBlendFunc {
param RsBlendSrcFunc srcFunc
param RsBlendDstFunc destFunc
}
-ProgramFragmentStoreDepthMask {
+ProgramStoreDepthMask {
param bool enable
}
-ProgramFragmentStoreDither {
+ProgramStoreDither {
param bool enable
}
-ProgramFragmentStoreDepthFunc {
+ProgramStoreDepthFunc {
param RsDepthFunc func
}
-ProgramFragmentStoreCreate {
- ret RsProgramFragmentStore
+ProgramStoreCreate {
+ ret RsProgramStore
}
ProgramRasterCreate {
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 017500b..f802a7f 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -131,7 +131,7 @@
{
ObjectBaseRef<ProgramFragment> frag(mFragment);
ObjectBaseRef<ProgramVertex> vtx(mVertex);
- ObjectBaseRef<ProgramFragmentStore> store(mFragmentStore);
+ ObjectBaseRef<ProgramStore> store(mFragmentStore);
ObjectBaseRef<ProgramRaster> raster(mRaster);
uint32_t ret = s->run(this, launchID);
@@ -582,7 +582,7 @@
mRootScript.set(s);
}
-void Context::setFragmentStore(ProgramFragmentStore *pfs)
+void Context::setFragmentStore(ProgramStore *pfs)
{
rsAssert(mIsGraphicsContext);
if (pfs == NULL) {
@@ -806,9 +806,9 @@
s->bindToContext(&rsc->mStateSampler, slot);
}
-void rsi_ContextBindProgramFragmentStore(Context *rsc, RsProgramFragmentStore vpfs)
+void rsi_ContextBindProgramStore(Context *rsc, RsProgramStore vpfs)
{
- ProgramFragmentStore *pfs = static_cast<ProgramFragmentStore *>(vpfs);
+ ProgramStore *pfs = static_cast<ProgramStore *>(vpfs);
rsc->setFragmentStore(pfs);
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 8249f5b..c8f0be5 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -33,7 +33,7 @@
#include "rsSampler.h"
#include "rsLight.h"
#include "rsProgramFragment.h"
-#include "rsProgramFragmentStore.h"
+#include "rsProgramStore.h"
#include "rsProgramRaster.h"
#include "rsProgramVertex.h"
#include "rsShaderCache.h"
@@ -71,7 +71,7 @@
TypeState mStateType;
SamplerState mStateSampler;
ProgramFragmentState mStateFragment;
- ProgramFragmentStoreState mStateFragmentStore;
+ ProgramStoreState mStateFragmentStore;
ProgramRasterState mStateRaster;
ProgramVertexState mStateVertex;
LightState mStateLight;
@@ -85,12 +85,12 @@
void setRaster(ProgramRaster *);
void setVertex(ProgramVertex *);
void setFragment(ProgramFragment *);
- void setFragmentStore(ProgramFragmentStore *);
+ void setFragmentStore(ProgramStore *);
void updateSurface(void *sur);
const ProgramFragment * getFragment() {return mFragment.get();}
- const ProgramFragmentStore * getFragmentStore() {return mFragmentStore.get();}
+ const ProgramStore * getFragmentStore() {return mFragmentStore.get();}
const ProgramRaster * getRaster() {return mRaster.get();}
const ProgramVertex * getVertex() {return mVertex.get();}
@@ -118,7 +118,7 @@
ProgramVertex * getDefaultProgramVertex() const {
return mStateVertex.mDefault.get();
}
- ProgramFragmentStore * getDefaultProgramFragmentStore() const {
+ ProgramStore * getDefaultProgramStore() const {
return mStateFragmentStore.mDefault.get();
}
ProgramRaster * getDefaultProgramRaster() const {
@@ -221,7 +221,7 @@
ObjectBaseRef<Script> mRootScript;
ObjectBaseRef<ProgramFragment> mFragment;
ObjectBaseRef<ProgramVertex> mVertex;
- ObjectBaseRef<ProgramFragmentStore> mFragmentStore;
+ ObjectBaseRef<ProgramStore> mFragmentStore;
ObjectBaseRef<ProgramRaster> mRaster;
diff --git a/libs/rs/rsProgramFragmentStore.cpp b/libs/rs/rsProgramStore.cpp
similarity index 78%
rename from libs/rs/rsProgramFragmentStore.cpp
rename to libs/rs/rsProgramStore.cpp
index 8a2157f..2e5114f 100644
--- a/libs/rs/rsProgramFragmentStore.cpp
+++ b/libs/rs/rsProgramStore.cpp
@@ -15,7 +15,7 @@
*/
#include "rsContext.h"
-#include "rsProgramFragmentStore.h"
+#include "rsProgramStore.h"
#include <GLES/gl.h>
#include <GLES/glext.h>
@@ -24,7 +24,7 @@
using namespace android::renderscript;
-ProgramFragmentStore::ProgramFragmentStore(Context *rsc) :
+ProgramStore::ProgramStore(Context *rsc) :
Program(rsc)
{
mAllocFile = __FILE__;
@@ -46,11 +46,11 @@
}
-ProgramFragmentStore::~ProgramFragmentStore()
+ProgramStore::~ProgramStore()
{
}
-void ProgramFragmentStore::setupGL(const Context *rsc, ProgramFragmentStoreState *state)
+void ProgramStore::setupGL(const Context *rsc, ProgramStoreState *state)
{
if (state->mLast.get() == this) {
return;
@@ -85,7 +85,7 @@
}
}
-void ProgramFragmentStore::setupGL2(const Context *rsc, ProgramFragmentStoreState *state)
+void ProgramStore::setupGL2(const Context *rsc, ProgramStoreState *state)
{
if (state->mLast.get() == this) {
return;
@@ -121,12 +121,12 @@
}
-void ProgramFragmentStore::setDitherEnable(bool enable)
+void ProgramStore::setDitherEnable(bool enable)
{
mDitherEnable = enable;
}
-void ProgramFragmentStore::setDepthFunc(RsDepthFunc func)
+void ProgramStore::setDepthFunc(RsDepthFunc func)
{
mDepthTestEnable = true;
@@ -156,12 +156,12 @@
}
}
-void ProgramFragmentStore::setDepthMask(bool mask)
+void ProgramStore::setDepthMask(bool mask)
{
mDepthWriteEnable = mask;
}
-void ProgramFragmentStore::setBlendFunc(RsBlendSrcFunc src, RsBlendDstFunc dst)
+void ProgramStore::setBlendFunc(RsBlendSrcFunc src, RsBlendDstFunc dst)
{
mBlendEnable = true;
if ((src == RS_BLEND_SRC_ONE) &&
@@ -227,7 +227,7 @@
}
}
-void ProgramFragmentStore::setColorMask(bool r, bool g, bool b, bool a)
+void ProgramStore::setColorMask(bool r, bool g, bool b, bool a)
{
mColorRWriteEnable = r;
mColorGWriteEnable = g;
@@ -236,24 +236,24 @@
}
-ProgramFragmentStoreState::ProgramFragmentStoreState()
+ProgramStoreState::ProgramStoreState()
{
mPFS = NULL;
}
-ProgramFragmentStoreState::~ProgramFragmentStoreState()
+ProgramStoreState::~ProgramStoreState()
{
delete mPFS;
}
-void ProgramFragmentStoreState::init(Context *rsc, int32_t w, int32_t h)
+void ProgramStoreState::init(Context *rsc, int32_t w, int32_t h)
{
- ProgramFragmentStore *pfs = new ProgramFragmentStore(rsc);
+ ProgramStore *pfs = new ProgramStore(rsc);
mDefault.set(pfs);
}
-void ProgramFragmentStoreState::deinit(Context *rsc)
+void ProgramStoreState::deinit(Context *rsc)
{
mDefault.clear();
mLast.clear();
@@ -263,42 +263,42 @@
namespace android {
namespace renderscript {
-void rsi_ProgramFragmentStoreBegin(Context * rsc, RsElement in, RsElement out)
+void rsi_ProgramStoreBegin(Context * rsc, RsElement in, RsElement out)
{
delete rsc->mStateFragmentStore.mPFS;
- rsc->mStateFragmentStore.mPFS = new ProgramFragmentStore(rsc);
+ rsc->mStateFragmentStore.mPFS = new ProgramStore(rsc);
}
-void rsi_ProgramFragmentStoreDepthFunc(Context *rsc, RsDepthFunc func)
+void rsi_ProgramStoreDepthFunc(Context *rsc, RsDepthFunc func)
{
rsc->mStateFragmentStore.mPFS->setDepthFunc(func);
}
-void rsi_ProgramFragmentStoreDepthMask(Context *rsc, bool mask)
+void rsi_ProgramStoreDepthMask(Context *rsc, bool mask)
{
rsc->mStateFragmentStore.mPFS->setDepthMask(mask);
}
-void rsi_ProgramFragmentStoreColorMask(Context *rsc, bool r, bool g, bool b, bool a)
+void rsi_ProgramStoreColorMask(Context *rsc, bool r, bool g, bool b, bool a)
{
rsc->mStateFragmentStore.mPFS->setColorMask(r, g, b, a);
}
-void rsi_ProgramFragmentStoreBlendFunc(Context *rsc, RsBlendSrcFunc src, RsBlendDstFunc dst)
+void rsi_ProgramStoreBlendFunc(Context *rsc, RsBlendSrcFunc src, RsBlendDstFunc dst)
{
rsc->mStateFragmentStore.mPFS->setBlendFunc(src, dst);
}
-RsProgramFragmentStore rsi_ProgramFragmentStoreCreate(Context *rsc)
+RsProgramStore rsi_ProgramStoreCreate(Context *rsc)
{
- ProgramFragmentStore *pfs = rsc->mStateFragmentStore.mPFS;
+ ProgramStore *pfs = rsc->mStateFragmentStore.mPFS;
pfs->incUserRef();
rsc->mStateFragmentStore.mPFS = 0;
return pfs;
}
-void rsi_ProgramFragmentStoreDither(Context *rsc, bool enable)
+void rsi_ProgramStoreDither(Context *rsc, bool enable)
{
rsc->mStateFragmentStore.mPFS->setDitherEnable(enable);
}
diff --git a/libs/rs/rsProgramFragmentStore.h b/libs/rs/rsProgramStore.h
similarity index 74%
rename from libs/rs/rsProgramFragmentStore.h
rename to libs/rs/rsProgramStore.h
index 3412c99..1b5543c 100644
--- a/libs/rs/rsProgramFragmentStore.h
+++ b/libs/rs/rsProgramStore.h
@@ -23,16 +23,16 @@
namespace android {
namespace renderscript {
-class ProgramFragmentStoreState;
+class ProgramStoreState;
-class ProgramFragmentStore : public Program
+class ProgramStore : public Program
{
public:
- ProgramFragmentStore(Context *);
- virtual ~ProgramFragmentStore();
+ ProgramStore(Context *);
+ virtual ~ProgramStore();
- virtual void setupGL(const Context *, ProgramFragmentStoreState *);
- virtual void setupGL2(const Context *, ProgramFragmentStoreState *);
+ virtual void setupGL(const Context *, ProgramStoreState *);
+ virtual void setupGL2(const Context *, ProgramStoreState *);
void setDepthFunc(RsDepthFunc);
void setDepthMask(bool);
@@ -60,19 +60,19 @@
bool mStencilTestEnable;
};
-class ProgramFragmentStoreState
+class ProgramStoreState
{
public:
- ProgramFragmentStoreState();
- ~ProgramFragmentStoreState();
+ ProgramStoreState();
+ ~ProgramStoreState();
void init(Context *rsc, int32_t w, int32_t h);
void deinit(Context *rsc);
- ObjectBaseRef<ProgramFragmentStore> mDefault;
- ObjectBaseRef<ProgramFragmentStore> mLast;
+ ObjectBaseRef<ProgramStore> mDefault;
+ ObjectBaseRef<ProgramStore> mLast;
- ProgramFragmentStore *mPFS;
+ ProgramStore *mPFS;
};
diff --git a/libs/rs/rsScript.h b/libs/rs/rsScript.h
index f05269a..c2fe8ef 100644
--- a/libs/rs/rsScript.h
+++ b/libs/rs/rsScript.h
@@ -27,7 +27,7 @@
class ProgramVertex;
class ProgramFragment;
class ProgramRaster;
-class ProgramFragmentStore;
+class ProgramStore;
#define MAX_SCRIPT_BANKS 32
@@ -50,7 +50,7 @@
ObjectBaseRef<ProgramVertex> mVertex;
ObjectBaseRef<ProgramFragment> mFragment;
ObjectBaseRef<ProgramRaster> mRaster;
- ObjectBaseRef<ProgramFragmentStore> mFragmentStore;
+ ObjectBaseRef<ProgramStore> mFragmentStore;
uint32_t mInvokeFunctionCount;
InvokeFunc_t *mInvokeFunctions;
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index 45c3052..86cda80 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -183,7 +183,7 @@
s->mEnviroment.mFragment.set(rsc->getDefaultProgramFragment());
s->mEnviroment.mVertex.set(rsc->getDefaultProgramVertex());
- s->mEnviroment.mFragmentStore.set(rsc->getDefaultProgramFragmentStore());
+ s->mEnviroment.mFragmentStore.set(rsc->getDefaultProgramStore());
s->mEnviroment.mRaster.set(rsc->getDefaultProgramRaster());
if (s->mProgram.mRoot) {
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 5cf0fdb..0e09474 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -215,13 +215,6 @@
// IO routines
//////////////////////////////////////////////////////////////////////////////
-static float* SC_loadSimpleMeshVerticesF(RsSimpleMesh mesh, uint32_t idx)
-{
- SimpleMesh *tm = static_cast<SimpleMesh *>(mesh);
- void *vp = tm->mVertexBuffers[idx]->getPtr();;
- return static_cast<float *>(vp);
-}
-
static void SC_updateSimpleMesh(RsSimpleMesh mesh)
{
GET_TLS();
@@ -645,10 +638,10 @@
}
-static void SC_bindProgramFragmentStore(RsProgramFragmentStore pfs)
+static void SC_bindProgramStore(RsProgramStore pfs)
{
GET_TLS();
- rsi_ContextBindProgramFragmentStore(rsc, pfs);
+ rsi_ContextBindProgramStore(rsc, pfs);
}
static void SC_bindProgramFragment(RsProgramFragment pf)
@@ -1145,7 +1138,6 @@
{ "__divsi3", (void *)&SC_divsi3 },
// IO
- { "loadSimpleMeshVerticesF", (void *)&SC_loadSimpleMeshVerticesF },
{ "updateSimpleMesh", (void *)&SC_updateSimpleMesh },
// OpenCL math
@@ -1316,8 +1308,7 @@
// context
{ "bindProgramFragment", (void *)&SC_bindProgramFragment },
- { "bindProgramFragmentStore", (void *)&SC_bindProgramFragmentStore },
- { "bindProgramStore", (void *)&SC_bindProgramFragmentStore },
+ { "bindProgramStore", (void *)&SC_bindProgramStore },
{ "bindProgramVertex", (void *)&SC_bindProgramVertex },
{ "bindProgramRaster", (void *)&SC_bindProgramRaster },
{ "bindSampler", (void *)&SC_bindSampler },