/frameworks/base/libs/rs/ |
D | rsProgram.cpp | 30 mHal.state.inputElementsCount++; in Program() 33 mHal.state.constantsCount++; in Program() 36 mHal.state.texturesCount++; in Program() 40 mHal.state.textures = new ObjectBaseRef<Allocation>[mHal.state.texturesCount]; in Program() 41 mHal.state.samplers = new ObjectBaseRef<Sampler>[mHal.state.texturesCount]; in Program() 42 mHal.state.textureTargets = new RsTextureTarget[mHal.state.texturesCount]; in Program() 43 mHal.state.inputElements = new ObjectBaseRef<Element>[mHal.state.inputElementsCount]; in Program() 44 mHal.state.constantTypes = new ObjectBaseRef<Type>[mHal.state.constantsCount]; in Program() 45 mHal.state.constants = new ObjectBaseRef<Allocation>[mHal.state.constantsCount]; in Program() 52 mHal.state.inputElements[input++].set(reinterpret_cast<Element *>(params[ct+1])); in Program() [all …]
|
D | rsMesh.cpp | 23 mHal.drv = NULL; in Mesh() 24 mHal.state.primitives = NULL; in Mesh() 25 mHal.state.primitivesCount = 0; in Mesh() 26 mHal.state.vertexBuffers = NULL; in Mesh() 27 mHal.state.vertexBuffersCount = 0; in Mesh() 34 mHal.drv = NULL; in Mesh() 35 mHal.state.primitivesCount = primitivesCount; in Mesh() 36 mHal.state.primitives = new Primitive_t *[mHal.state.primitivesCount]; in Mesh() 37 for (uint32_t i = 0; i < mHal.state.primitivesCount; i ++) { in Mesh() 38 mHal.state.primitives[i] = new Primitive_t; in Mesh() [all …]
|
D | rsProgramStore.cpp | 29 memset(&mHal, 0, sizeof(mHal)); in ProgramStore() 31 mHal.state.ditherEnable = ditherEnable; in ProgramStore() 33 mHal.state.colorRWriteEnable = colorMaskR; in ProgramStore() 34 mHal.state.colorGWriteEnable = colorMaskG; in ProgramStore() 35 mHal.state.colorBWriteEnable = colorMaskB; in ProgramStore() 36 mHal.state.colorAWriteEnable = colorMaskA; in ProgramStore() 37 mHal.state.blendSrc = srcFunc; in ProgramStore() 38 mHal.state.blendDst = destFunc; in ProgramStore() 40 mHal.state.depthWriteEnable = depthMask; in ProgramStore() 41 mHal.state.depthFunc = depthFunc; in ProgramStore() [all …]
|
D | rsFBOCache.cpp | 28 mHal.state.colorTargetsCount = 1; in FBOCache() 29 mHal.state.colorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount]; in FBOCache() 33 delete[] mHal.state.colorTargets; in ~FBOCache() 37 rsc->mHal.funcs.framebuffer.init(rsc, this); in init() 41 rsc->mHal.funcs.framebuffer.destroy(rsc, this); in deinit() 45 if (slot >= mHal.state.colorTargetsCount) { in bindColorTarget() 55 mHal.state.colorTargets[slot].set(a); in bindColorTarget() 66 mHal.state.depthTarget.set(a); in bindDepthTarget() 71 for (uint32_t i = 0; i < mHal.state.colorTargetsCount; i ++) { in resetAll() 72 mHal.state.colorTargets[i].set(NULL); in resetAll() [all …]
|
D | rsAllocation.cpp | 28 memset(&mHal, 0, sizeof(mHal)); in Allocation() 29 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE; in Allocation() 30 mHal.state.usageFlags = usages; in Allocation() 31 mHal.state.mipmapControl = mc; in Allocation() 33 mHal.state.type.set(type); in Allocation() 41 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) { in createAllocation() 50 const Type *type = mHal.state.type.get(); in updateCache() 51 mHal.state.dimensionX = type->getDimX(); in updateCache() 52 mHal.state.dimensionY = type->getDimY(); in updateCache() 53 mHal.state.dimensionZ = type->getDimZ(); in updateCache() [all …]
|
D | rsSampler.cpp | 37 mHal.state.magFilter = magFilter; in Sampler() 38 mHal.state.minFilter = minFilter; in Sampler() 39 mHal.state.wrapS = wrapS; in Sampler() 40 mHal.state.wrapT = wrapT; in Sampler() 41 mHal.state.wrapR = wrapR; in Sampler() 42 mHal.state.aniso = aniso; in Sampler() 44 mRSC->mHal.funcs.sampler.init(mRSC, this); in Sampler() 48 mRSC->mHal.funcs.sampler.destroy(mRSC, this); in ~Sampler() 89 if (existing->mHal.state.magFilter != magFilter) continue; in getSampler() 90 if (existing->mHal.state.minFilter != minFilter ) continue; in getSampler() [all …]
|
D | rsScriptC.cpp | 47 mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this); in ~ScriptC() 48 mRSC->mHal.funcs.script.destroy(mRSC, this); in ~ScriptC() 55 for (uint32_t ct=0; ct < mHal.info.exportedVariableCount; ct++) { in setupScript() 67 rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, ptr); in setupScript() 76 for (uint32_t ct=0; ct < mHal.info.exportedVariableCount; ct++) { in ptrToAllocation() 103 if (mHal.info.root == NULL) { in run() 114 LOGV("%p ScriptC::run invoking root, ptr %p", rsc, mHal.info.root); in run() 117 ret = rsc->mHal.funcs.script.invokeRoot(rsc, this); in run() 138 rsc->mHal.funcs.script.invokeForEach(rsc, this, 0, ain, aout, usr, usrBytes, sc); in runForEach() 142 if (slot >= mHal.info.exportedFunctionCount) { in Invoke() [all …]
|
D | rsProgramRaster.cpp | 27 memset(&mHal, 0, sizeof(mHal)); in ProgramRaster() 28 mHal.state.pointSprite = pointSprite; in ProgramRaster() 29 mHal.state.cull = cull; in ProgramRaster() 30 rsc->mHal.funcs.raster.init(rsc, this); in ProgramRaster() 43 mRSC->mHal.funcs.raster.destroy(mRSC, this); in ~ProgramRaster() 53 rsc->mHal.funcs.raster.setActive(rsc, this); in setup() 85 if (existing->mHal.state.pointSprite != pointSprite) continue; in getProgramRaster() 86 if (existing->mHal.state.cull != cull) continue; in getProgramRaster()
|
D | rsProgramVertex.cpp | 28 mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader.string(), mUserShader.length()); in ProgramVertex() 32 mRSC->mHal.funcs.vertex.destroy(mRSC, this); in ~ProgramVertex() 41 if (mHal.state.constants[0].get() == NULL) { in setup() 46 float *f = static_cast<float *>(mHal.state.constants[0]->getPtr()); in setup() 59 rsc->mHal.funcs.vertex.setActive(rsc, this); in setup() 68 if (mHal.state.constants[0].get() == NULL) { in setProjectionMatrix() 73 float *f = static_cast<float *>(mHal.state.constants[0]->getPtr()); in setProjectionMatrix() 84 if (mHal.state.constants[0].get() == NULL) { in setModelviewMatrix() 89 float *f = static_cast<float *>(mHal.state.constants[0]->getPtr()); in setModelviewMatrix() 100 if (mHal.state.constants[0].get() == NULL) { in setTextureMatrix() [all …]
|
D | rsScript.cpp | 24 memset(&mHal, 0, sizeof(mHal)); in Script() 43 if (slot >= mHal.info.exportedVariableCount) { in setSlot() 50 mRSC->mHal.funcs.script.setGlobalBind(mRSC, this, slot, a->getPtr()); in setSlot() 52 mRSC->mHal.funcs.script.setGlobalBind(mRSC, this, slot, NULL); in setSlot() 58 if (slot >= mHal.info.exportedVariableCount) { in setVar() 62 mRSC->mHal.funcs.script.setGlobalVar(mRSC, this, slot, (void *)val, len); in setVar() 67 if (slot >= mHal.info.exportedVariableCount) { in setVarObj() 72 mRSC->mHal.funcs.script.setGlobalObj(mRSC, this, slot, val); in setVarObj() 77 mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this); in freeChildren()
|
D | rsAllocation.h | 66 Hal mHal; variable 73 void * getPtr() const {return mHal.drvState.mallocPtr;} in getPtr() 74 const Type * getType() const {return mHal.state.type.get();} in getType() 105 return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_SCRIPT) != 0; in getIsScript() 108 return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE) != 0; in getIsTexture() 111 return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET) != 0; in getIsRenderTarget() 114 return (mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_VERTEX) != 0; in getIsBufferObject() 123 return mHal.state.mipmapControl != RS_ALLOCATION_MIPMAP_NONE; in getHasGraphicsMipmaps()
|
D | rsProgramFragment.cpp | 32 mRSC->mHal.funcs.fragment.init(mRSC, this, mUserShader.string(), mUserShader.length()); in ProgramFragment() 36 mRSC->mHal.funcs.fragment.destroy(mRSC, this); in ~ProgramFragment() 45 if (mHal.state.constants[0].get() == NULL) { in setConstantColor() 54 memcpy(mHal.state.constants[0]->getPtr(), mConstantColor, 4*sizeof(float)); in setConstantColor() 64 for (uint32_t ct=0; ct < mHal.state.texturesCount; ct++) { in setup() 65 if (!mHal.state.textures[ct].get()) { in setup() 72 rsc->mHal.funcs.fragment.setActive(rsc, this); in setup()
|
D | rsMesh.h | 62 Hal mHal; variable 65 mHal.state.vertexBuffers[index].set(vb); in setVertexBuffer() 69 mHal.state.primitives[index]->mIndexBuffer.set(idx); in setPrimitive() 70 mHal.state.primitives[index]->mPrimitive = prim; in setPrimitive()
|
D | rsContext.cpp | 41 if (!mHal.funcs.initGraphics(this)) { in initGLThread() 52 mHal.funcs.shutdownGraphics(this); in deinitEGL() 225 rsc->mHal.funcs.setPriority(rsc, rsc->mThreadPriority); in threadProc() 277 rsc->mHal.funcs.swap(rsc); in threadProc() 445 if (mHal.funcs.shutdownDriver) { in ~Context() 446 mHal.funcs.shutdownDriver(this); in ~Context() 462 mHal.funcs.setSurface(this, w, h, sur); in setSurface()
|
/frameworks/base/libs/rs/driver/ |
D | rsdFrameBuffer.cpp | 33 RsdFrameBufferObj *fbo = (RsdFrameBufferObj*)fb->mHal.drv; in setDepthAttachment() 36 if (fb->mHal.state.depthTarget.get() != NULL) { in setDepthAttachment() 37 depth = (DrvAllocation *)fb->mHal.state.depthTarget->mHal.drv; in setDepthAttachment() 40 rsdAllocationSyncAll(rsc, fb->mHal.state.depthTarget.get(), in setDepthAttachment() 48 RsdFrameBufferObj *fbo = (RsdFrameBufferObj*)fb->mHal.drv; in setColorAttachment() 50 for (uint32_t i = 0; i < fb->mHal.state.colorTargetsCount; i ++) { in setColorAttachment() 52 if (fb->mHal.state.colorTargets[i].get() != NULL) { in setColorAttachment() 53 color = (DrvAllocation *)fb->mHal.state.colorTargets[i]->mHal.drv; in setColorAttachment() 56 rsdAllocationSyncAll(rsc, fb->mHal.state.colorTargets[i].get(), in setColorAttachment() 69 fb->mHal.drv = fbo; in rsdFrameBufferInit() [all …]
|
D | rsdAllocation.cpp | 79 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture() 85 if (alloc->mHal.state.hasFaces) { in Update2DTexture() 93 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Upload2DTexture() 99 if (alloc->mHal.state.hasFaces) { in Upload2DTexture() 105 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture() 107 p += alloc->mHal.state.type->getLODFaceOffset(lod, (RsAllocationCubemapFace)face, 0, 0); in Upload2DTexture() 110 if (alloc->mHal.state.hasFaces) { in Upload2DTexture() 116 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture() 117 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture() 121 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture() [all …]
|
D | rsdProgram.cpp | 39 pv->mHal.drv = drv; in rsdProgramVertexInit() 45 for (uint32_t ct=0; ct < p->mHal.state.texturesCount; ct++) { in SyncProgramConstants() 46 const Allocation *a = p->mHal.state.textures[ct].get(); in SyncProgramConstants() 50 DrvAllocation *drvAlloc = (DrvAllocation *)a->mHal.drv; in SyncProgramConstants() 58 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdProgramVertexSetActive() 61 dc->gl.shaderCache->setActiveVertex((RsdShader*)pv->mHal.drv); in rsdProgramVertexSetActive() 65 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdProgramVertexDestroy() 68 if(pv->mHal.drv) { in rsdProgramVertexDestroy() 69 drv = (RsdShader*)pv->mHal.drv; in rsdProgramVertexDestroy() 83 pf->mHal.drv = drv; in rsdProgramFragmentInit() [all …]
|
D | rsdProgramStore.cpp | 46 ps->mHal.drv = drv; in rsdProgramStoreInit() 49 switch (ps->mHal.state.depthFunc) { in rsdProgramStoreInit() 80 if ((ps->mHal.state.blendSrc == RS_BLEND_SRC_ONE) && in rsdProgramStoreInit() 81 (ps->mHal.state.blendDst == RS_BLEND_DST_ZERO)) { in rsdProgramStoreInit() 85 switch (ps->mHal.state.blendSrc) { in rsdProgramStoreInit() 118 switch (ps->mHal.state.blendDst) { in rsdProgramStoreInit() 152 ps->mHal.drv = NULL; in rsdProgramStoreInit() 157 DrvProgramStore *drv = (DrvProgramStore *)ps->mHal.drv; in rsdProgramStoreSetActive() 159 RSD_CALL_GL(glColorMask, ps->mHal.state.colorRWriteEnable, in rsdProgramStoreSetActive() 160 ps->mHal.state.colorGWriteEnable, in rsdProgramStoreSetActive() [all …]
|
D | rsdShader.cpp | 71 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { in init() 72 …initAddUserElement(mRSProgram->mHal.state.inputElements[ct].get(), mAttribNames, NULL, &attribCoun… in init() 74 for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) { in init() 75 …initAddUserElement(mRSProgram->mHal.state.constantTypes[ct]->getElement(), mUniformNames, mUniform… in init() 80 for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) { in init() 91 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { in getGLSLInputString() 92 const Element *e = mRSProgram->mHal.state.inputElements[ct].get(); in getGLSLInputString() 115 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { in appendAttributes() 116 const Element *e = mRSProgram->mHal.state.inputElements[ct].get(); in appendAttributes() 144 for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) { in appendTextures() [all …]
|
D | rsdMesh.cpp | 32 if(m->mHal.drv) { in rsdMeshInit() 33 drv = (RsdMeshObj*)m->mHal.drv; in rsdMeshInit() 37 m->mHal.drv = drv; in rsdMeshInit() 42 if(m->mHal.drv) { in rsdMeshDraw() 43 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdMeshDraw() 48 RsdMeshObj *drv = (RsdMeshObj*)m->mHal.drv; in rsdMeshDraw() 54 if(m->mHal.drv) { in rsdMeshDestroy() 55 RsdMeshObj *drv = (RsdMeshObj*)m->mHal.drv; in rsdMeshDestroy()
|
D | rsdMeshObj.cpp | 82 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { in init() 83 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); in init() 105 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { in init() 106 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); in init() 135 if (len < 1 || primIndex >= mRSMesh->mHal.state.primitivesCount || mAttribCount == 0) { in renderPrimitiveRange() 140 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { in renderPrimitiveRange() 141 const Allocation *alloc = mRSMesh->mHal.state.vertexBuffers[ct].get(); in renderPrimitiveRange() 142 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in renderPrimitiveRange() 151 Allocation *alloc = mRSMesh->mHal.state.vertexBuffers[allocIndex].get(); in renderPrimitiveRange() 152 DrvAllocation *drvAlloc = (DrvAllocation *)alloc->mHal.drv; in renderPrimitiveRange() [all …]
|
D | rsdBcc.cpp | 85 script->mHal.drv = drv; in rsdScriptInit() 88 script->mHal.info.isThreadable = true; in rsdScriptInit() 165 script->mHal.info.exportedFunctionCount = drv->ME->getExportFuncCount(); in rsdScriptInit() 166 script->mHal.info.exportedVariableCount = drv->ME->getExportVarCount(); in rsdScriptInit() 167 script->mHal.info.exportedPragmaCount = drv->ME->getPragmaCount(); in rsdScriptInit() 168 script->mHal.info.exportedPragmaKeyList = drv->ME->getPragmaKeyList(); in rsdScriptInit() 169 script->mHal.info.exportedPragmaValueList = drv->ME->getPragmaValueList(); in rsdScriptInit() 170 script->mHal.info.root = drv->mRoot; in rsdScriptInit() 226 RsdHal * dc = (RsdHal *)mtls->rsc->mHal.drv; in wc_xy() 248 dc->mForEachLaunch[sig](&mtls->script->mHal.info.root, &p); in wc_xy() [all …]
|
D | rsdCore.cpp | 137 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in HelperThreadProc() 176 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdLaunchThreads() 190 rsc->mHal.funcs = FunctionTable; in rsdHalInit() 197 rsc->mHal.drv = dc; in rsdHalInit() 261 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in SetPriority() 268 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in Shutdown()
|
D | rsdProgramRaster.cpp | 36 switch (pr->mHal.state.cull) { in rsdProgramRasterSetActive()
|
/frameworks/compile/libbcc/lib/ScriptCRT/ |
D | rs_core.c | 36 } mHal; member 248 return alloc->mHal.state.dimensionX; in rsAllocationGetDimX() 254 return alloc->mHal.state.dimensionY; in rsAllocationGetDimY() 260 return alloc->mHal.state.dimensionZ; in rsAllocationGetDimZ() 266 return alloc->mHal.state.hasMipmaps; in rsAllocationGetDimLOD() 272 return alloc->mHal.state.hasFaces; in rsAllocationGetDimFaces() 278 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.mallocPtr; in rsGetElementAt() 279 const uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsGetElementAt() 286 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.mallocPtr; in rsGetElementAt() 287 const uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsGetElementAt() [all …]
|