summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2010-05-13 18:30:11 -0700
committer Jason Sams <rjsams@android.com> 2010-05-13 18:35:01 -0700
commit54db59c3594e887a412a24713fc3daa1c2404593 (patch)
treecd78b514370d0e9b60e3711417395601824e8270
parentf5523645a97643874840e029b4a7e9a4e4220806 (diff)
Rename ProgramFragmentStore to ProgramStore.
Change-Id: Ia8ad9ac856944838ced38a2f1e8f07387050bdfd
-rw-r--r--graphics/java/android/renderscript/ProgramStore.java14
-rw-r--r--graphics/java/android/renderscript/RenderScript.java16
-rw-r--r--graphics/java/android/renderscript/RenderScriptGL.java4
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp64
-rw-r--r--libs/rs/Android.mk2
-rw-r--r--libs/rs/RenderScript.h2
-rw-r--r--libs/rs/RenderScriptEnv.h2
-rw-r--r--libs/rs/rs.spec20
-rw-r--r--libs/rs/rsContext.cpp8
-rw-r--r--libs/rs/rsContext.h12
-rw-r--r--libs/rs/rsProgramStore.cpp (renamed from libs/rs/rsProgramFragmentStore.cpp)48
-rw-r--r--libs/rs/rsProgramStore.h (renamed from libs/rs/rsProgramFragmentStore.h)24
-rw-r--r--libs/rs/rsScript.h4
-rw-r--r--libs/rs/rsScriptC.cpp2
-rw-r--r--libs/rs/rsScriptC_Lib.cpp15
15 files changed, 114 insertions, 123 deletions
diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java
index 69be245483e9..f558117e10c2 100644
--- a/graphics/java/android/renderscript/ProgramStore.java
+++ b/graphics/java/android/renderscript/ProgramStore.java
@@ -147,17 +147,17 @@ public class ProgramStore extends BaseObj {
if (b.mOut != null) {
outID = b.mOut.mID;
}
- rs.nProgramFragmentStoreBegin(inID, outID);
- rs.nProgramFragmentStoreDepthFunc(b.mDepthFunc.mID);
- rs.nProgramFragmentStoreDepthMask(b.mDepthMask);
- rs.nProgramFragmentStoreColorMask(b.mColorMaskR,
+ rs.nProgramStoreBegin(inID, outID);
+ rs.nProgramStoreDepthFunc(b.mDepthFunc.mID);
+ rs.nProgramStoreDepthMask(b.mDepthMask);
+ rs.nProgramStoreColorMask(b.mColorMaskR,
b.mColorMaskG,
b.mColorMaskB,
b.mColorMaskA);
- rs.nProgramFragmentStoreBlendFunc(b.mBlendSrc.mID, b.mBlendDst.mID);
- rs.nProgramFragmentStoreDither(b.mDither);
+ rs.nProgramStoreBlendFunc(b.mBlendSrc.mID, b.mBlendDst.mID);
+ rs.nProgramStoreDither(b.mDither);
- int id = rs.nProgramFragmentStoreCreate();
+ int id = rs.nProgramStoreCreate();
return new ProgramStore(id, rs);
}
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index e9f8fe6c86db..67965052d93f 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -71,7 +71,7 @@ public class RenderScript {
native void nContextBindRootScript(int script);
native void nContextBindSampler(int sampler, int slot);
- native void nContextBindProgramFragmentStore(int pfs);
+ native void nContextBindProgramStore(int pfs);
native void nContextBindProgramFragment(int pf);
native void nContextBindProgramVertex(int pf);
native void nContextBindProgramRaster(int pr);
@@ -154,13 +154,13 @@ public class RenderScript {
native void nSamplerSet(int param, int value);
native int nSamplerCreate();
- native void nProgramFragmentStoreBegin(int in, int out);
- native void nProgramFragmentStoreDepthFunc(int func);
- native void nProgramFragmentStoreDepthMask(boolean enable);
- native void nProgramFragmentStoreColorMask(boolean r, boolean g, boolean b, boolean a);
- native void nProgramFragmentStoreBlendFunc(int src, int dst);
- native void nProgramFragmentStoreDither(boolean enable);
- native int nProgramFragmentStoreCreate();
+ native void nProgramStoreBegin(int in, int out);
+ native void nProgramStoreDepthFunc(int func);
+ native void nProgramStoreDepthMask(boolean enable);
+ native void nProgramStoreColorMask(boolean r, boolean g, boolean b, boolean a);
+ native void nProgramStoreBlendFunc(int src, int dst);
+ native void nProgramStoreDither(boolean enable);
+ native int nProgramStoreCreate();
native int nProgramRasterCreate(int in, int out, boolean pointSmooth, boolean lineSmooth, boolean pointSprite);
native void nProgramRasterSetLineWidth(int pr, float v);
diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java
index d1df23d9d0a1..e90b4fc05f83 100644
--- a/graphics/java/android/renderscript/RenderScriptGL.java
+++ b/graphics/java/android/renderscript/RenderScriptGL.java
@@ -74,9 +74,9 @@ public class RenderScriptGL extends RenderScript {
nContextBindRootScript(safeID(s));
}
- public void contextBindProgramFragmentStore(ProgramStore p) {
+ public void contextBindProgramStore(ProgramStore p) {
validate();
- nContextBindProgramFragmentStore(safeID(p));
+ nContextBindProgramStore(safeID(p));
}
public void contextBindProgramFragment(ProgramFragment p) {
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 2a7ad386a39b..00e626463d78 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -1042,60 +1042,60 @@ nScriptCAddDefineF(JNIEnv *_env, jobject _this, jstring name, jfloat value)
// ---------------------------------------------------------------------------
static void
-nProgramFragmentStoreBegin(JNIEnv *_env, jobject _this, jint in, jint out)
+nProgramStoreBegin(JNIEnv *_env, jobject _this, jint in, jint out)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreBegin, con(%p), in(%p), out(%p)", con, (RsElement)in, (RsElement)out);
- rsProgramFragmentStoreBegin(con, (RsElement)in, (RsElement)out);
+ LOG_API("nProgramStoreBegin, con(%p), in(%p), out(%p)", con, (RsElement)in, (RsElement)out);
+ rsProgramStoreBegin(con, (RsElement)in, (RsElement)out);
}
static void
-nProgramFragmentStoreDepthFunc(JNIEnv *_env, jobject _this, jint func)
+nProgramStoreDepthFunc(JNIEnv *_env, jobject _this, jint func)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreDepthFunc, con(%p), func(%i)", con, func);
- rsProgramFragmentStoreDepthFunc(con, (RsDepthFunc)func);
+ LOG_API("nProgramStoreDepthFunc, con(%p), func(%i)", con, func);
+ rsProgramStoreDepthFunc(con, (RsDepthFunc)func);
}
static void
-nProgramFragmentStoreDepthMask(JNIEnv *_env, jobject _this, jboolean enable)
+nProgramStoreDepthMask(JNIEnv *_env, jobject _this, jboolean enable)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreDepthMask, con(%p), enable(%i)", con, enable);
- rsProgramFragmentStoreDepthMask(con, enable);
+ LOG_API("nProgramStoreDepthMask, con(%p), enable(%i)", con, enable);
+ rsProgramStoreDepthMask(con, enable);
}
static void
-nProgramFragmentStoreColorMask(JNIEnv *_env, jobject _this, jboolean r, jboolean g, jboolean b, jboolean a)
+nProgramStoreColorMask(JNIEnv *_env, jobject _this, jboolean r, jboolean g, jboolean b, jboolean a)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreColorMask, con(%p), r(%i), g(%i), b(%i), a(%i)", con, r, g, b, a);
- rsProgramFragmentStoreColorMask(con, r, g, b, a);
+ LOG_API("nProgramStoreColorMask, con(%p), r(%i), g(%i), b(%i), a(%i)", con, r, g, b, a);
+ rsProgramStoreColorMask(con, r, g, b, a);
}
static void
-nProgramFragmentStoreBlendFunc(JNIEnv *_env, jobject _this, int src, int dst)
+nProgramStoreBlendFunc(JNIEnv *_env, jobject _this, int src, int dst)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreBlendFunc, con(%p), src(%i), dst(%i)", con, src, dst);
- rsProgramFragmentStoreBlendFunc(con, (RsBlendSrcFunc)src, (RsBlendDstFunc)dst);
+ LOG_API("nProgramStoreBlendFunc, con(%p), src(%i), dst(%i)", con, src, dst);
+ rsProgramStoreBlendFunc(con, (RsBlendSrcFunc)src, (RsBlendDstFunc)dst);
}
static void
-nProgramFragmentStoreDither(JNIEnv *_env, jobject _this, jboolean enable)
+nProgramStoreDither(JNIEnv *_env, jobject _this, jboolean enable)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreDither, con(%p), enable(%i)", con, enable);
- rsProgramFragmentStoreDither(con, enable);
+ LOG_API("nProgramStoreDither, con(%p), enable(%i)", con, enable);
+ rsProgramStoreDither(con, enable);
}
static jint
-nProgramFragmentStoreCreate(JNIEnv *_env, jobject _this)
+nProgramStoreCreate(JNIEnv *_env, jobject _this)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nProgramFragmentStoreCreate, con(%p)", con);
+ LOG_API("nProgramStoreCreate, con(%p)", con);
- return (jint)rsProgramFragmentStoreCreate(con);
+ return (jint)rsProgramStoreCreate(con);
}
// ---------------------------------------------------------------------------
@@ -1225,11 +1225,11 @@ nContextBindRootScript(JNIEnv *_env, jobject _this, jint script)
}
static void
-nContextBindProgramFragmentStore(JNIEnv *_env, jobject _this, jint pfs)
+nContextBindProgramStore(JNIEnv *_env, jobject _this, jint pfs)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nContextBindProgramFragmentStore, con(%p), pfs(%p)", con, (RsProgramFragmentStore)pfs);
- rsContextBindProgramFragmentStore(con, (RsProgramFragmentStore)pfs);
+ LOG_API("nContextBindProgramStore, con(%p), pfs(%p)", con, (RsProgramStore)pfs);
+ rsContextBindProgramStore(con, (RsProgramStore)pfs);
}
static void
@@ -1453,13 +1453,13 @@ static JNINativeMethod methods[] = {
{"nScriptCSetScript", "([BII)V", (void*)nScriptCSetScript },
{"nScriptCCreate", "()I", (void*)nScriptCCreate },
-{"nProgramFragmentStoreBegin", "(II)V", (void*)nProgramFragmentStoreBegin },
-{"nProgramFragmentStoreDepthFunc", "(I)V", (void*)nProgramFragmentStoreDepthFunc },
-{"nProgramFragmentStoreDepthMask", "(Z)V", (void*)nProgramFragmentStoreDepthMask },
-{"nProgramFragmentStoreColorMask", "(ZZZZ)V", (void*)nProgramFragmentStoreColorMask },
-{"nProgramFragmentStoreBlendFunc", "(II)V", (void*)nProgramFragmentStoreBlendFunc },
-{"nProgramFragmentStoreDither", "(Z)V", (void*)nProgramFragmentStoreDither },
-{"nProgramFragmentStoreCreate", "()I", (void*)nProgramFragmentStoreCreate },
+{"nProgramStoreBegin", "(II)V", (void*)nProgramStoreBegin },
+{"nProgramStoreDepthFunc", "(I)V", (void*)nProgramStoreDepthFunc },
+{"nProgramStoreDepthMask", "(Z)V", (void*)nProgramStoreDepthMask },
+{"nProgramStoreColorMask", "(ZZZZ)V", (void*)nProgramStoreColorMask },
+{"nProgramStoreBlendFunc", "(II)V", (void*)nProgramStoreBlendFunc },
+{"nProgramStoreDither", "(Z)V", (void*)nProgramStoreDither },
+{"nProgramStoreCreate", "()I", (void*)nProgramStoreCreate },
{"nProgramBindConstants", "(III)V", (void*)nProgramBindConstants },
{"nProgramBindTexture", "(III)V", (void*)nProgramBindTexture },
@@ -1483,7 +1483,7 @@ static JNINativeMethod methods[] = {
{"nLightSetPosition", "(IFFF)V", (void*)nLightSetPosition },
{"nContextBindRootScript", "(I)V", (void*)nContextBindRootScript },
-{"nContextBindProgramFragmentStore","(I)V", (void*)nContextBindProgramFragmentStore },
+{"nContextBindProgramStore", "(I)V", (void*)nContextBindProgramStore },
{"nContextBindProgramFragment", "(I)V", (void*)nContextBindProgramFragment },
{"nContextBindProgramVertex", "(I)V", (void*)nContextBindProgramVertex },
{"nContextBindProgramRaster", "(I)V", (void*)nContextBindProgramRaster },
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk
index 95571e7b0afc..f5cfe860017c 100644
--- a/libs/rs/Android.mk
+++ b/libs/rs/Android.mk
@@ -91,7 +91,7 @@ LOCAL_SRC_FILES:= \
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 7415ba953f8e..5e246ce5c7e8 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -44,7 +44,7 @@ typedef void * RsLight;
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 99b8c0456f04..144e5392a1d0 100644
--- a/libs/rs/RenderScriptEnv.h
+++ b/libs/rs/RenderScriptEnv.h
@@ -12,7 +12,7 @@ typedef void * RsScript;
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 a589d5bf00f2..9c57e6679a04 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -4,8 +4,8 @@ ContextBindRootScript {
param RsScript sampler
}
-ContextBindProgramFragmentStore {
- param RsProgramFragmentStore pgm
+ContextBindProgramStore {
+ param RsProgramStore pgm
}
ContextBindProgramFragment {
@@ -342,37 +342,37 @@ ScriptCSetDefineI32 {
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 017500ba6f6d..f802a7f98a16 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -131,7 +131,7 @@ uint32_t Context::runScript(Script *s, uint32_t launchID)
{
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 @@ void Context::setRootScript(Script *s)
mRootScript.set(s);
}
-void Context::setFragmentStore(ProgramFragmentStore *pfs)
+void Context::setFragmentStore(ProgramStore *pfs)
{
rsAssert(mIsGraphicsContext);
if (pfs == NULL) {
@@ -806,9 +806,9 @@ void rsi_ContextBindSampler(Context *rsc, uint32_t slot, RsSampler vs)
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 8249f5b862e8..c8f0be569ae3 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 @@ public:
TypeState mStateType;
SamplerState mStateSampler;
ProgramFragmentState mStateFragment;
- ProgramFragmentStoreState mStateFragmentStore;
+ ProgramStoreState mStateFragmentStore;
ProgramRasterState mStateRaster;
ProgramVertexState mStateVertex;
LightState mStateLight;
@@ -85,12 +85,12 @@ public:
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 @@ public:
ProgramVertex * getDefaultProgramVertex() const {
return mStateVertex.mDefault.get();
}
- ProgramFragmentStore * getDefaultProgramFragmentStore() const {
+ ProgramStore * getDefaultProgramStore() const {
return mStateFragmentStore.mDefault.get();
}
ProgramRaster * getDefaultProgramRaster() const {
@@ -221,7 +221,7 @@ protected:
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
index 8a2157f3c0b2..2e5114f1f5db 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;
using namespace android::renderscript;
-ProgramFragmentStore::ProgramFragmentStore(Context *rsc) :
+ProgramStore::ProgramStore(Context *rsc) :
Program(rsc)
{
mAllocFile = __FILE__;
@@ -46,11 +46,11 @@ ProgramFragmentStore::ProgramFragmentStore(Context *rsc) :
}
-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::setupGL(const Context *rsc, ProgramFragmentStoreState
}
}
-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::setupGL2(const Context *rsc, ProgramFragmentStoreStat
}
-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::setDepthFunc(RsDepthFunc func)
}
}
-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::setBlendFunc(RsBlendSrcFunc src, RsBlendDstFunc dst)
}
}
-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 @@ void ProgramFragmentStore::setColorMask(bool r, bool g, bool b, bool a)
}
-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 @@ void ProgramFragmentStoreState::deinit(Context *rsc)
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
index 3412c9918ac1..1b5543caea03 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 @@ protected:
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 f05269af473f..c2fe8ef00662 100644
--- a/libs/rs/rsScript.h
+++ b/libs/rs/rsScript.h
@@ -27,7 +27,7 @@ namespace renderscript {
class ProgramVertex;
class ProgramFragment;
class ProgramRaster;
-class ProgramFragmentStore;
+class ProgramStore;
#define MAX_SCRIPT_BANKS 32
@@ -50,7 +50,7 @@ public:
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 45c305225848..86cda808edaa 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -183,7 +183,7 @@ void ScriptCState::runCompiler(Context *rsc, ScriptC *s)
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 5cf0fdbfc84b..0e094748c4a1 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -215,13 +215,6 @@ typedef struct {
// 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_bindSampler(RsProgramFragment vpf, uint32_t slot, RsSampler vs)
}
-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 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
{ "__divsi3", (void *)&SC_divsi3 },
// IO
- { "loadSimpleMeshVerticesF", (void *)&SC_loadSimpleMeshVerticesF },
{ "updateSimpleMesh", (void *)&SC_updateSimpleMesh },
// OpenCL math
@@ -1316,8 +1308,7 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
// 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 },