Lines Matching refs:rsc

120 static bool failIfInKernel(Context *rsc, const char *funcName) {  in failIfInKernel()  argument
121 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in failIfInKernel()
128 rsc->setError(RS_ERROR_FATAL_DRIVER, buf); in failIfInKernel()
140 Context *rsc = RsdCpuReference::getTlsContext(); in rsGetAllocation() local
142 Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); in rsGetAllocation()
144 alloc->callUpdateCacheObject(rsc, &obj); in rsGetAllocation()
149 Context *rsc = RsdCpuReference::getTlsContext(); in rsGetAllocation() local
151 Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); in rsGetAllocation()
158 alloc->callUpdateCacheObject(rsc, &obj); in rsGetAllocation()
164 Context *rsc = RsdCpuReference::getTlsContext(); in rsAllocationIoSend() local
165 if (failIfInKernel(rsc, "rsAllocationIoSend")) in rsAllocationIoSend()
167 rsrAllocationIoSend(rsc, (Allocation *)a.p); in rsAllocationIoSend()
171 Context *rsc = RsdCpuReference::getTlsContext(); in rsAllocationIoReceive() local
172 if (failIfInKernel(rsc, "rsAllocationIoReceive")) in rsAllocationIoReceive()
174 rsrAllocationIoReceive(rsc, (Allocation *)a.p); in rsAllocationIoReceive()
182 Context *rsc = RsdCpuReference::getTlsContext(); in rsAllocationCopy1DRange() local
183 if (failIfInKernel(rsc, "rsAllocationCopy1DRange")) in rsAllocationCopy1DRange()
185 rsrAllocationCopy1DRange(rsc, (Allocation *)dstAlloc.p, dstOff, dstMip, in rsAllocationCopy1DRange()
197 Context *rsc = RsdCpuReference::getTlsContext(); in rsAllocationCopy2DRange() local
198 if (failIfInKernel(rsc, "rsAllocationCopy2DRange")) in rsAllocationCopy2DRange()
200 rsrAllocationCopy2DRange(rsc, (Allocation *)dstAlloc.p, in rsAllocationCopy2DRange()
214 Context *rsc = RsdCpuReference::getTlsContext(); \
215 rsrClearObject(rsc, reinterpret_cast<rs_object_base *>(dst)); \
218 Context *rsc = RsdCpuReference::getTlsContext(); \
219 rsrSetObject(rsc, reinterpret_cast<rs_object_base *>(dst), (ObjectBase*)src.p); \
242 Context *rsc = RsdCpuReference::getTlsContext(); in IS_CLEAR_SET_OBJ() local
249 rsc->setError(RS_ERROR_FATAL_DEBUG, buf); in IS_CLEAR_SET_OBJ()
255 rsc->setError(RS_ERROR_FATAL_DEBUG, buf); in IS_CLEAR_SET_OBJ()
261 rsc->setError(RS_ERROR_FATAL_DEBUG, buf); in IS_CLEAR_SET_OBJ()
268 rsc->setError(RS_ERROR_FATAL_DEBUG, buf); in IS_CLEAR_SET_OBJ()
274 rsc->setError(RS_ERROR_FATAL_DEBUG, buf); in IS_CLEAR_SET_OBJ()
441 Context *rsc = RsdCpuReference::getTlsContext(); in ELEMENT_AT_OVERLOADS() local
442 rsrForEach(rsc, (Script *)script.p, (Allocation *)in.p, in ELEMENT_AT_OVERLOADS()
450 Context *rsc = RsdCpuReference::getTlsContext(); in rsForEach() local
451 rsrForEach(rsc, (Script *)script.p, (Allocation *)in.p, (Allocation *)out.p, in rsForEach()
458 Context *rsc = RsdCpuReference::getTlsContext(); in rsForEach() local
459 rsrForEach(rsc, (Script *)script.p, (Allocation *)in.p, (Allocation *)out.p, in rsForEach()
470 Context *rsc = RsdCpuReference::getTlsContext(); in rsForEach() local
471 rsrForEach(rsc, (Script *)script.p, (Allocation *)in.p, (Allocation *)out.p, in rsForEach()
481 Context *rsc = RsdCpuReference::getTlsContext(); in rsForEach() local
482 rsrForEach(rsc, (Script *)script.p, (Allocation *)in.p, (Allocation *)out.p, in rsForEach()
491 Context *rsc = RsdCpuReference::getTlsContext(); in rsSendToClient() local
492 return rsrToClient(rsc, cmdID, (const void *)nullptr, 0); in rsSendToClient()
496 Context *rsc = RsdCpuReference::getTlsContext(); in rsSendToClient() local
497 return rsrToClient(rsc, cmdID, data, len); in rsSendToClient()
501 Context *rsc = RsdCpuReference::getTlsContext(); in rsSendToClientBlocking() local
502 return rsrToClientBlocking(rsc, cmdID, (const void *)nullptr, 0); in rsSendToClientBlocking()
506 Context *rsc = RsdCpuReference::getTlsContext(); in rsSendToClientBlocking() local
507 return rsrToClientBlocking(rsc, cmdID, data, len); in rsSendToClientBlocking()
522 Context *rsc = RsdCpuReference::getTlsContext(); local
523 return rsrTime(rsc, (time_t *)timer);
531 Context *rsc = RsdCpuReference::getTlsContext(); local
532 return (rs_tm*)rsrLocalTime(rsc, (tm*)local, (time_t *)timer);
536 Context *rsc = RsdCpuReference::getTlsContext(); local
537 return rsrUptimeMillis(rsc);
541 Context *rsc = RsdCpuReference::getTlsContext(); local
542 return rsrUptimeNanos(rsc);
546 Context *rsc = RsdCpuReference::getTlsContext(); local
548 return rsrGetDt(rsc, sc);
559 Context *rsc = RsdCpuReference::getTlsContext(); local
561 if (!rsc->setupCheck()) {
565 RsdHal *dc = (RsdHal *)rsc->mHal.drv;
566 if (!dc->gl.shaderCache->setup(rsc)) {
584 va.setup(rsc);
600 Context *rsc = RsdCpuReference::getTlsContext(); local
602 ObjectBaseRef<const ProgramVertex> tmp(rsc->getProgramVertex());
603 rsc->setProgramVertex(rsc->getDefaultProgramVertex());
608 float sh = rsc->getHeight();
614 rsc->setProgramVertex((ProgramVertex *)tmp.get());
618 Context *rsc = RsdCpuReference::getTlsContext(); local
619 rsrAllocationSyncAll(rsc, (Allocation *)a.p, RS_ALLOCATION_USAGE_SCRIPT);
623 Context *rsc = RsdCpuReference::getTlsContext(); local
624 rsrAllocationSyncAll(rsc, (Allocation *)a.p, RS_ALLOCATION_USAGE_SCRIPT);
629 Context *rsc = RsdCpuReference::getTlsContext(); local
630 rsrAllocationSyncAll(rsc, (Allocation *)a.p, (RsAllocationUsageType)usage);
636 Context *rsc = RsdCpuReference::getTlsContext(); local
637 rsrAllocationSyncAll(rsc, (Allocation *)a.p, (RsAllocationUsageType)source.val);
641 Context *rsc = RsdCpuReference::getTlsContext(); local
642 rsrBindProgramFragment(rsc, (ProgramFragment *)pf.p);
646 Context *rsc = RsdCpuReference::getTlsContext(); local
647 rsrBindProgramStore(rsc, (ProgramStore *)ps.p);
651 Context *rsc = RsdCpuReference::getTlsContext(); local
652 rsrBindProgramVertex(rsc, (ProgramVertex *)pv.p);
656 Context *rsc = RsdCpuReference::getTlsContext(); local
657 rsrBindProgramRaster(rsc, (ProgramRaster *)pr.p);
662 Context *rsc = RsdCpuReference::getTlsContext(); local
663 rsrBindSampler(rsc, (ProgramFragment *)pf.p, slot, (Sampler *)s.p);
668 Context *rsc = RsdCpuReference::getTlsContext(); local
669 rsrBindTexture(rsc, (ProgramFragment *)pf.p, slot, (Allocation *)a.p);
674 Context *rsc = RsdCpuReference::getTlsContext(); local
675 rsrBindConstant(rsc, (ProgramFragment *)pf.p, slot, (Allocation *)a.p);
680 Context *rsc = RsdCpuReference::getTlsContext(); local
681 rsrBindConstant(rsc, (ProgramVertex *)pv.p, slot, (Allocation *)a.p);
685 Context *rsc = RsdCpuReference::getTlsContext(); local
686 rsrVpLoadProjectionMatrix(rsc, (const rsc_Matrix *)m);
690 Context *rsc = RsdCpuReference::getTlsContext(); local
691 rsrVpLoadModelMatrix(rsc, (const rsc_Matrix *)m);
695 Context *rsc = RsdCpuReference::getTlsContext(); local
696 rsrVpLoadTextureMatrix(rsc, (const rsc_Matrix *)m);
700 Context *rsc = RsdCpuReference::getTlsContext(); local
701 rsrVpGetProjectionMatrix(rsc, (rsc_Matrix *)m);
706 Context *rsc = RsdCpuReference::getTlsContext(); local
707 rsrPfConstantColor(rsc, (ProgramFragment *)pf.p, r, g, b, a);
711 Context *rsc = RsdCpuReference::getTlsContext(); local
712 return rsrGetWidth(rsc);
716 Context *rsc = RsdCpuReference::getTlsContext(); local
717 return rsrGetHeight(rsc);
752 Context *rsc = RsdCpuReference::getTlsContext(); local
753 rsrDrawMesh(rsc, (Mesh *)ism.p);
757 Context *rsc = RsdCpuReference::getTlsContext(); local
758 rsrDrawMeshPrimitive(rsc, (Mesh *)ism.p, primitiveIndex);
762 Context *rsc = RsdCpuReference::getTlsContext(); local
763 rsrDrawMeshPrimitiveRange(rsc, (Mesh *)ism.p, primitiveIndex, start, len);
769 Context *rsc = RsdCpuReference::getTlsContext(); local
770 rsrMeshComputeBoundingBox(rsc, (Mesh *)mesh.p, minX, minY, minZ, maxX, maxY, maxZ);
774 Context *rsc = RsdCpuReference::getTlsContext(); local
775 rsrPrepareClear(rsc);
776 rsdGLClearColor(rsc, r, g, b, a);
780 Context *rsc = RsdCpuReference::getTlsContext(); local
781 rsrPrepareClear(rsc);
782 rsdGLClearDepth(rsc, value);
786 Context *rsc = RsdCpuReference::getTlsContext(); local
787 rsrDrawText(rsc, text, x, y);
791 Context *rsc = RsdCpuReference::getTlsContext(); local
792 rsrDrawTextAlloc(rsc, (Allocation *)a.p, x, y);
797 Context *rsc = RsdCpuReference::getTlsContext(); local
798 rsrMeasureText(rsc, text, left, right, top, bottom);
803 Context *rsc = RsdCpuReference::getTlsContext(); local
804 rsrMeasureTextAlloc(rsc, (Allocation *)a.p, left, right, top, bottom);
808 Context *rsc = RsdCpuReference::getTlsContext(); local
809 rsrBindFont(rsc, (Font *)font.p);
813 Context *rsc = RsdCpuReference::getTlsContext(); local
814 rsrFontColor(rsc, r, g, b, a);
818 Context *rsc = RsdCpuReference::getTlsContext(); local
819 rsrBindFrameBufferObjectColorTarget(rsc, (Allocation *)a.p, slot);
823 Context *rsc = RsdCpuReference::getTlsContext(); local
824 rsrBindFrameBufferObjectDepthTarget(rsc, (Allocation *)a.p);
828 Context *rsc = RsdCpuReference::getTlsContext(); local
829 rsrClearFrameBufferObjectColorTarget(rsc, slot);
833 Context *rsc = RsdCpuReference::getTlsContext(); local
834 rsrClearFrameBufferObjectDepthTarget(rsc);
838 Context *rsc = RsdCpuReference::getTlsContext(); local
839 rsrClearFrameBufferObjectTargets(rsc);
843 Context *rsc = RsdCpuReference::getTlsContext(); local
844 rsrColor(rsc, r, g, b, a);
848 Context *rsc = RsdCpuReference::getTlsContext(); local
849 rsdGLFinish(rsc);