Lines Matching refs:rsc
25 ProgramFragment::ProgramFragment(Context *rsc, const char * shaderText, size_t shaderLength, in ProgramFragment() argument
28 : Program(rsc, shaderText, shaderLength, params, paramLength) { in ProgramFragment()
42 void ProgramFragment::setConstantColor(Context *rsc, float r, float g, float b, float a) { in setConstantColor() argument
45 … rsc->setError(RS_ERROR_BAD_SHADER, "Cannot set fixed function emulation color on user program"); in setConstantColor()
50 …rsc->setError(RS_ERROR_BAD_SHADER, "Unable to set fixed function emulation color because allocatio… in setConstantColor()
57 void *p = rsc->mHal.funcs.allocation.lock1D(rsc, mHal.state.constants[0]); in setConstantColor()
60 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setConstantColor()
63 void ProgramFragment::setup(Context *rsc, ProgramFragmentState *state) { in setup() argument
72 rsc->setError(RS_ERROR_BAD_SHADER, "No texture bound"); in setup()
77 rsc->mHal.funcs.fragment.setActive(rsc, this); in setup()
80 void ProgramFragment::serialize(Context *rsc, OStream *stream) const { in serialize() argument
83 ProgramFragment *ProgramFragment::createFromStream(Context *rsc, IStream *stream) { in createFromStream() argument
96 void ProgramFragmentState::init(Context *rsc) { in init() argument
106 …ObjectBaseRef<const Element> colorElem = Element::createRef(rsc, RS_TYPE_FLOAT_32, RS_KIND_USER, f… in init()
110 ObjectBaseRef<const Element> constInput = Element::create(rsc, 1, eins, enames); in init()
112 ObjectBaseRef<Type> inputType = Type::getTypeRef(rsc, constInput.get(), 1); in init()
118 Allocation *constAlloc = Allocation::createAllocation(rsc, inputType.get(), in init()
120 ProgramFragment *pf = new ProgramFragment(rsc, shaderString, strlen(shaderString), in init()
122 pf->bindAllocation(rsc, constAlloc, 0); in init()
123 pf->setConstantColor(rsc, 1.0f, 1.0f, 1.0f, 1.0f); in init()
128 void ProgramFragmentState::deinit(Context *rsc) { in deinit() argument
133 RsProgramFragment rsi_ProgramFragmentCreate(Context *rsc, const char * shaderText, in rsi_ProgramFragmentCreate() argument
139 ProgramFragment *pf = new ProgramFragment(rsc, shaderText, shaderLength, in rsi_ProgramFragmentCreate()