Home | History | Annotate | Download | only in rs

Lines Matching refs:rsc

53     Context * rsc = tls->mContext; \
56 ScriptC::ScriptC(Context *rsc) : Script(rsc) {
120 void ScriptC::setupScript(Context *rsc) {
133 rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, mSlots[ct].get());
137 void ScriptC::setupGLState(Context *rsc) {
140 rsc->setProgramStore(mEnviroment.mFragmentStore.get());
143 rsc->setProgramFragment(mEnviroment.mFragment.get());
146 rsc->setProgramVertex(mEnviroment.mVertex.get());
149 rsc->setProgramRaster(mEnviroment.mRaster.get());
154 uint32_t ScriptC::run(Context *rsc) {
156 rsc->setError(RS_ERROR_BAD_SCRIPT, "Attempted to run bad script");
160 setupGLState(rsc);
161 setupScript(rsc);
165 if (rsc->props.mLogScripts) {
166 ALOGV("%p ScriptC::run invoking root, ptr %p", rsc, mHal.info.root);
169 ret = rsc->mHal.funcs.script.invokeRoot(rsc, this);
171 if (rsc->props.mLogScripts) {
172 ALOGV("%p ScriptC::run invoking complete, ret=%i", rsc, ret);
179 void ScriptC::runForEach(Context *rsc,
197 rsc->setError(RS_ERROR_BAD_SCRIPT,
213 Context::PushState ps(rsc);
215 setupGLState(rsc);
216 setupScript(rsc);
218 if (rsc->props.mLogScripts) {
219 ALOGV("%p ScriptC::runForEach invoking slot %i, ptr %p", rsc, slot, this);
222 if (rsc->mHal.funcs.script.invokeForEachMulti != nullptr) {
223 rsc->mHal.funcs.script.invokeForEachMulti(rsc, this, slot, ains, inLen,
227 rsc->mHal.funcs.script.invokeForEach(rsc, this, slot, ains[0], aout,
231 rsc->setError(RS_ERROR_FATAL_DRIVER,
236 void ScriptC::runReduce(Context *rsc, uint32_t slot,
243 rsc->setError(RS_ERROR_BAD_SCRIPT, "The general reduce kernel index is out of bounds");
248 setupScript(rsc);
250 if (rsc->props.mLogScripts) {
251 ALOGV("%p ScriptC::runReduce invoking slot %i, ptr %p", rsc, slot, this);
254 rsc->mHal.funcs.script.invokeReduce(rsc, this, slot, ains, inLen, aout, sc);
257 void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, size_t len) {
261 rsc->setError(RS_ERROR_BAD_SCRIPT, "The invokable index is out of bounds");
266 setupScript(rsc);
268 if (rsc->props.mLogScripts) {
269 ALOGV("%p ScriptC::Invoke invoking slot %i, ptr %p", rsc, slot, this);
271 rsc->mHal.funcs.script.invokeFunction(rsc, this, slot, data, len);
312 bool ScriptC::runCompiler(Context *rsc,
318 //ALOGE("runCompiler %p %p %p %p %p %i", rsc, this, resName, cacheDir, bitcode, bitcodeLen);
335 sdkVersion = rsc->getTargetSdkVersion();
360 rsc->setOptLevel(bcWrapper.getOptimizationLevel());
375 if (!rsc->mHal.funcs.script.init(rsc, this, resName, cacheDir, bitcode, bitcodeLen, 0)) {
381 mEnviroment.mFragment.set(rsc->getDefaultProgramFragment());
382 mEnviroment.mVertex.set(rsc->getDefaultProgramVertex());
383 mEnviroment.mFragmentStore.set(rsc->getDefaultProgramStore());
384 mEnviroment.mRaster.set(rsc->getDefaultProgramRaster());
387 rsc->mHal.funcs.script.invokeInit(rsc, this);
462 RsScript rsi_ScriptCCreate(Context *rsc,
467 ScriptC *s = new ScriptC(rsc);
469 if (!s->runCompiler(rsc, resName, cacheDir, (uint8_t *)text, text_length)) {