Lines Matching refs:rsc

24 ProgramVertex::ProgramVertex(Context *rsc, const char * shaderText, size_t shaderLength,  in ProgramVertex()  argument
28 : Program(rsc, shaderText, shaderLength, params, paramLength) { in ProgramVertex()
37 void ProgramVertex::setup(Context *rsc, ProgramVertexState *state) { in setup() argument
44 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setup()
48 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setup()
49 rsc, mHal.state.constants[0])); in setup()
58 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setup()
63 rsc->mHal.funcs.vertex.setActive(rsc, this); in setup()
66 void ProgramVertex::setProjectionMatrix(Context *rsc, const rsc_Matrix *m) const { in setProjectionMatrix() argument
68 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setProjectionMatrix()
73 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setProjectionMatrix()
77 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setProjectionMatrix()
78 rsc, mHal.state.constants[0])); in setProjectionMatrix()
81 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setProjectionMatrix()
84 void ProgramVertex::setModelviewMatrix(Context *rsc, const rsc_Matrix *m) const { in setModelviewMatrix() argument
86 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setModelviewMatrix()
91 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setModelviewMatrix()
95 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setModelviewMatrix()
96 rsc, mHal.state.constants[0])); in setModelviewMatrix()
99 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setModelviewMatrix()
102 void ProgramVertex::setTextureMatrix(Context *rsc, const rsc_Matrix *m) const { in setTextureMatrix() argument
104 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setTextureMatrix()
109 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in setTextureMatrix()
113 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setTextureMatrix()
114 rsc, mHal.state.constants[0])); in setTextureMatrix()
117 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setTextureMatrix()
120 void ProgramVertex::getProjectionMatrix(Context *rsc, rsc_Matrix *m) const { in getProjectionMatrix() argument
122 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in getProjectionMatrix()
127 rsc->setError(RS_ERROR_FATAL_UNKNOWN, in getProjectionMatrix()
132 rsc->mHal.funcs.allocation.lock1D(rsc, mHal.state.constants[0])); in getProjectionMatrix()
134 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in getProjectionMatrix()
137 void ProgramVertex::transformToScreen(Context *rsc, float *v4out, const float *v3in) const { in transformToScreen() argument
142 rsc->mHal.funcs.allocation.lock1D(rsc, mHal.state.constants[0])); in transformToScreen()
147 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in transformToScreen()
150 void ProgramVertex::serialize(Context *rsc, OStream *stream) const { in serialize() argument
153 ProgramVertex *ProgramVertex::createFromStream(Context *rsc, IStream *stream) { in createFromStream() argument
166 void ProgramVertexState::init(Context *rsc) { in init() argument
167 ObjectBaseRef<const Element> matrixElem = Element::createRef(rsc, RS_TYPE_MATRIX_4X4, in init()
169 ObjectBaseRef<const Element> f2Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32, in init()
171 ObjectBaseRef<const Element> f3Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32, in init()
173 ObjectBaseRef<const Element> f4Elem = Element::createRef(rsc, RS_TYPE_FLOAT_32, in init()
179 ObjectBaseRef<const Element> constInput = Element::create(rsc, 4, ebe1, ebn1); in init()
183 ObjectBaseRef<const Element> attrElem = Element::create(rsc, 4, ebe2, ebn2); in init()
185 ObjectBaseRef<Type> inputType = Type::getTypeRef(rsc, constInput.get(), 1); in init()
204 ProgramVertex *pv = new ProgramVertex(rsc, shaderString, strlen(shaderString), in init()
206 Allocation *alloc = Allocation::createAllocation(rsc, inputType.get(), in init()
208 pv->bindAllocation(rsc, alloc, 0); in init()
213 updateSize(rsc); in init()
216 void ProgramVertexState::updateSize(Context *rsc) { in updateSize() argument
217 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D(rsc, mDefaultAlloc.get())); in updateSize()
219 float surfaceWidth = (float)rsc->getCurrentSurfaceWidth(); in updateSize()
220 float surfaceHeight = (float)rsc->getCurrentSurfaceHeight(); in updateSize()
230 rsc->mHal.funcs.allocation.unlock1D(rsc, mDefaultAlloc.get()); in updateSize()
233 void ProgramVertexState::deinit(Context *rsc) { in deinit() argument
243 RsProgramVertex rsi_ProgramVertexCreate(Context *rsc, const char * shaderText, size_t shaderLength, in rsi_ProgramVertexCreate() argument
247 ProgramVertex *pv = new ProgramVertex(rsc, shaderText, shaderLength, in rsi_ProgramVertexCreate()