/frameworks/rs/ |
D | rsType.cpp | 31 memset(&mHal, 0, sizeof(mHal)); in Type() 51 t->getContext()->mHal.funcs.freeRuntimeMem(ptr); in operator delete() 56 if (mHal.state.lodCount) { in clear() 57 delete [] mHal.state.lodDimX; in clear() 58 delete [] mHal.state.lodDimY; in clear() 59 delete [] mHal.state.lodDimZ; in clear() 62 memset(&mHal, 0, sizeof(mHal)); in clear() 73 uint32_t oldLODCount = mHal.state.lodCount; in compute() 75 uint32_t l2x = rsFindHighBit(mHal.state.dimX) + 1; in compute() 76 uint32_t l2y = rsFindHighBit(mHal.state.dimY) + 1; in compute() [all …]
|
D | rsProgram.cpp | 32 mHal.state.inputElementsCount++; in Program() 35 mHal.state.constantsCount++; in Program() 38 mHal.state.texturesCount++; in Program() 42 mTextures = new ObjectBaseRef<Allocation>[mHal.state.texturesCount]; in Program() 43 mSamplers = new ObjectBaseRef<Sampler>[mHal.state.texturesCount]; in Program() 44 mInputElements = new ObjectBaseRef<Element>[mHal.state.inputElementsCount]; in Program() 45 mConstantTypes = new ObjectBaseRef<Type>[mHal.state.constantsCount]; in Program() 46 mConstants = new ObjectBaseRef<Allocation>[mHal.state.constantsCount]; in Program() 48 mHal.state.textures = new Allocation*[mHal.state.texturesCount]; in Program() 49 mHal.state.samplers = new Sampler*[mHal.state.texturesCount]; in Program() [all …]
|
D | rsMesh.cpp | 25 mHal.drv = NULL; in Mesh() 26 mHal.state.primitives = NULL; in Mesh() 27 mHal.state.primitivesCount = 0; in Mesh() 28 mHal.state.indexBuffers = NULL; in Mesh() 29 mHal.state.indexBuffersCount = 0; in Mesh() 30 mHal.state.vertexBuffers = NULL; in Mesh() 31 mHal.state.vertexBuffersCount = 0; in Mesh() 41 mHal.drv = NULL; in Mesh() 42 mHal.state.primitivesCount = primitivesCount; in Mesh() 43 mHal.state.indexBuffersCount = primitivesCount; 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 | rsProgramVertex.cpp | 30 mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader, mUserShaderLen, in ProgramVertex() 35 mRSC->mHal.funcs.vertex.destroy(mRSC, this); in ~ProgramVertex() 44 if (mHal.state.constants[0] == NULL) { in setup() 49 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setup() 50 rsc, mHal.state.constants[0])); in setup() 59 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); in setup() 64 rsc->mHal.funcs.vertex.setActive(rsc, this); in setup() 73 if (mHal.state.constants[0] == NULL) { in setProjectionMatrix() 78 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( in setProjectionMatrix() 79 rsc, mHal.state.constants[0])); in setProjectionMatrix() [all …]
|
D | rsFBOCache.cpp | 28 mHal.state.colorTargetsCount = 1; in FBOCache() 29 mHal.state.colorTargets = new Allocation*[mHal.state.colorTargetsCount]; in FBOCache() 30 mColorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount]; in FBOCache() 35 delete[] mHal.state.colorTargets; in ~FBOCache() 40 rsc->mHal.funcs.framebuffer.init(rsc, this); in init() 44 rsc->mHal.funcs.framebuffer.destroy(rsc, this); in deinit() 48 if (slot >= mHal.state.colorTargetsCount) { in bindColorTarget() 53 if (!(a->getIsTexture() || (a->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT))) { in bindColorTarget() 59 mHal.state.colorTargets[slot] = a; in bindColorTarget() 71 mHal.state.depthTarget = a; in bindDepthTarget() [all …]
|
D | rsAllocation.cpp | 34 memset(&mHal, 0, sizeof(mHal)); in Allocation() 35 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE; in Allocation() 36 mHal.state.usageFlags = usages; in Allocation() 37 mHal.state.mipmapControl = mc; in Allocation() 38 mHal.state.userProvidedPtr = ptr; in Allocation() 47 a->getContext()->mHal.funcs.freeRuntimeMem(ptr); in operator delete() 54 void* allocMem = rsc->mHal.funcs.allocRuntimeMem(sizeof(Allocation), 0); in createAllocation() 63 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) { in createAllocation() 73 const Type *type = mHal.state.type; in updateCache() 74 mHal.state.yuv = type->getDimYuv(); in updateCache() [all …]
|
D | rsGrallocConsumer.cpp | 45 uint32_t y = a->mHal.drvState.lod[0].dimY; in GrallocConsumer() 47 mConsumer->setDefaultBufferSize(a->mHal.drvState.lod[0].dimX, y); in GrallocConsumer() 49 if (a->mHal.state.yuv) { in GrallocConsumer() 50 bq->setDefaultBufferFormat(a->mHal.state.yuv); in GrallocConsumer() 131 mAlloc->mHal.drvState.lod[0].mallocPtr = reinterpret_cast<uint8_t*>(bufferPointer); in lockNextBuffer() 132 mAlloc->mHal.drvState.lod[0].stride = mSlots[buf].mGraphicBuffer->getStride() * in lockNextBuffer() 133 mAlloc->mHal.state.type->getElementSizeBytes(); in lockNextBuffer() 134 mAlloc->mHal.state.nativeBuffer = mAcquiredBuffer.mGraphicBuffer->getNativeBuffer(); in lockNextBuffer() 135 mAlloc->mHal.state.timestamp = b.mTimestamp; in lockNextBuffer() 137 assert(mAlloc->mHal.drvState.lod[0].dimX == in lockNextBuffer() [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 | rsType.h | 57 Hal mHal; variable 68 uint32_t getDimX() const {return mHal.state.dimX;} in getDimX() 69 uint32_t getDimY() const {return mHal.state.dimY;} in getDimY() 70 uint32_t getDimZ() const {return mHal.state.dimZ;} in getDimZ() 72 bool getDimFaces() const {return mHal.state.faces;} in getDimFaces() 73 uint32_t getDimYuv() const {return mHal.state.dimYuv;} in getDimYuv() 76 rsAssert(lod < mHal.state.lodCount); in getLODDimX() 77 return mHal.state.lodDimX[lod]; in getLODDimX() 80 rsAssert(lod < mHal.state.lodCount); in getLODDimY() 81 return mHal.state.lodDimY[lod]; in getLODDimY() [all …]
|
D | rsScriptC.cpp | 54 mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this); in ~ScriptC() 55 mRSC->mHal.funcs.script.destroy(mRSC, this); in ~ScriptC() 104 for (uint32_t ct=0; ct < mHal.info.exportedVariableCount; ct++) { in setupScript() 111 rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, mSlots[ct].get()); in setupScript() 133 if (mHal.info.root == NULL) { in run() 144 ALOGV("%p ScriptC::run invoking root, ptr %p", rsc, mHal.info.root); in run() 147 ret = rsc->mHal.funcs.script.invokeRoot(rsc, this); in run() 171 AString->append(mHal.info.exportedForeachFuncList[slot].first); in runForEach() 181 rsc->mHal.funcs.script.invokeForEach(rsc, this, slot, ain, aout, usr, usrBytes, sc); in runForEach() 202 AString->append(mHal.info.exportedForeachFuncList[slot].first); in runForEach() [all …]
|
D | rsElement.cpp | 30 memset(&mHal, 0, sizeof(mHal)); in Element() 40 e->getContext()->mHal.funcs.freeRuntimeMem(ptr); in operator delete() 64 delete [] mHal.state.fields; in clear() 65 delete [] mHal.state.fieldArraySizes; in clear() 66 delete [] mHal.state.fieldNames; in clear() 67 delete [] mHal.state.fieldNameLengths; in clear() 68 delete [] mHal.state.fieldOffsetBytes; in clear() 173 mHal.state.dataType = mComponent.getType(); in compute() 174 mHal.state.dataKind = mComponent.getKind(); in compute() 175 mHal.state.vectorSize = mComponent.getVectorSize(); in compute() [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()
|
/frameworks/rs/driver/ |
D | rsdShader.cpp | 81 for (uint32_t ct = 0; ct < mRSProgram->mHal.state.texturesCount; ct ++) { in getExistingState() 83 if (mRSProgram->mHal.state.textureTargets[ct] == RS_TEXTURE_2D) { in getExistingState() 84 Allocation *a = mRSProgram->mHal.state.textures[ct]; in getExistingState() 85 if (a && a->mHal.state.surfaceTextureID) { in getExistingState() 121 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { in init() 122 initAddUserElement(mRSProgram->mHal.state.inputElements[ct], mAttribNames, in init() 125 for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) { in init() 126 initAddUserElement(mRSProgram->mHal.state.constantTypes[ct]->getElement(), in init() 131 for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) { in init() 141 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { in getGLSLInputString() [all …]
|
D | rsdFrameBuffer.cpp | 33 RsdFrameBufferObj *fbo = (RsdFrameBufferObj*)fb->mHal.drv; in setDepthAttachment() 36 if (fb->mHal.state.depthTarget != NULL) { in setDepthAttachment() 37 depth = (DrvAllocation *)fb->mHal.state.depthTarget->mHal.drv; in setDepthAttachment() 40 rsdAllocationSyncAll(rsc, fb->mHal.state.depthTarget, 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] != NULL) { in setColorAttachment() 53 color = (DrvAllocation *)fb->mHal.state.colorTargets[i]->mHal.drv; in setColorAttachment() 56 rsdAllocationSyncAll(rsc, fb->mHal.state.colorTargets[i], in setColorAttachment() 69 fb->mHal.drv = fbo; in rsdFrameBufferInit() [all …]
|
D | rsdAllocation.cpp | 95 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in GetOffsetPtr() 96 ptr += face * alloc->mHal.drvState.faceOffset; in GetOffsetPtr() 97 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr() 98 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr() 99 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr() 108 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture() 114 if (alloc->mHal.state.hasFaces) { in Update2DTexture() 124 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Upload2DTexture() 130 if (alloc->mHal.state.hasFaces) { in Upload2DTexture() 136 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture() [all …]
|
D | rsdMeshObj.cpp | 55 RsDataType dt = elem->mHal.state.fields[fieldIdx]->mHal.state.dataType; in isValidGLComponent() 63 uint32_t arraySize = elem->mHal.state.fieldArraySizes[fieldIdx]; in isValidGLComponent() 77 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { in init() 78 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); in init() 79 for (uint32_t ct=0; ct < elem->mHal.state.fieldsCount; ct++) { in init() 100 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { in init() 101 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); in init() 102 uint32_t stride = elem->mHal.state.elementSizeBytes; in init() 103 for (uint32_t fieldI=0; fieldI < elem->mHal.state.fieldsCount; fieldI++) { in init() 104 const Element *f = elem->mHal.state.fields[fieldI]; in init() [all …]
|
D | rsdProgram.cpp | 42 pv->mHal.drv = drv; in rsdProgramVertexInit() 48 for (uint32_t ct=0; ct < p->mHal.state.texturesCount; ct++) { in SyncProgramConstants() 49 const Allocation *a = p->mHal.state.textures[ct]; in SyncProgramConstants() 53 DrvAllocation *drvAlloc = (DrvAllocation *)a->mHal.drv; in SyncProgramConstants() 61 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdProgramVertexSetActive() 64 dc->gl.shaderCache->setActiveVertex((RsdShader*)pv->mHal.drv); in rsdProgramVertexSetActive() 68 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdProgramVertexDestroy() 71 if(pv->mHal.drv) { in rsdProgramVertexDestroy() 72 drv = (RsdShader*)pv->mHal.drv; in rsdProgramVertexDestroy() 89 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 | rsdBcc.cpp | 45 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdScriptInit() 51 script->mHal.drv = cs; in rsdScriptInit() 57 RsdHal *dc = (RsdHal *)rsc->mHal.drv; in rsdInitIntrinsic() 62 s->mHal.drv = cs; in rsdInitIntrinsic() 76 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeForEach() 90 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeForEachMulti() 96 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeRoot() 101 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeInit() 106 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeFreeChildren() 114 RsdCpuReference::CpuScript *cs = (RsdCpuReference::CpuScript *)s->mHal.drv; in rsdScriptInvokeFunction() [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()
|
/frameworks/rs/driver/runtime/ |
D | rs_element.c | 13 return element->mHal.state.fieldsCount; in rsElementGetSubElementCount() 19 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElement() 23 rs_element returnElem = {element->mHal.state.fields[index]}; in rsElementGetSubElement() 30 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElementNameLength() 33 return element->mHal.state.fieldNameLengths[index]; in rsElementGetSubElementNameLength() 39 if (element == NULL || index >= element->mHal.state.fieldsCount || in rsElementGetSubElementName() 44 uint32_t numToCopy = element->mHal.state.fieldNameLengths[index]; in rsElementGetSubElementName() 51 const char *nameSource = element->mHal.state.fieldNames[index]; in rsElementGetSubElementName() 61 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElementArraySize() 64 return element->mHal.state.fieldArraySizes[index]; in rsElementGetSubElementArraySize() [all …]
|
D | rs_program.c | 16 return prog->mHal.state.depthFunc; in rsgProgramStoreGetDepthFunc() 25 return prog->mHal.state.depthWriteEnable; in rsgProgramStoreIsDepthMaskEnabled() 34 return prog->mHal.state.colorRWriteEnable; in rsgProgramStoreIsColorMaskRedEnabled() 43 return prog->mHal.state.colorGWriteEnable; in rsgProgramStoreIsColorMaskGreenEnabled() 52 return prog->mHal.state.colorBWriteEnable; in rsgProgramStoreIsColorMaskBlueEnabled() 61 return prog->mHal.state.colorAWriteEnable; in rsgProgramStoreIsColorMaskAlphaEnabled() 70 return prog->mHal.state.blendSrc; in rsgProgramStoreGetBlendSrcFunc() 79 return prog->mHal.state.blendDst; in rsgProgramStoreGetBlendDstFunc() 88 return prog->mHal.state.ditherEnable; in rsgProgramStoreIsDitherEnabled() 100 return prog->mHal.state.pointSprite; in rsgProgramRasterIsPointSpriteEnabled() [all …]
|
D | rs_allocation.c | 8 return alloc->mHal.drvState.lod[0].dimX; in rsAllocationGetDimX() 14 return alloc->mHal.drvState.lod[0].dimY; in rsAllocationGetDimY() 20 return alloc->mHal.drvState.lod[0].dimZ; in rsAllocationGetDimZ() 26 return alloc->mHal.state.hasMipmaps; in rsAllocationGetDimLOD() 32 return alloc->mHal.state.hasFaces; in rsAllocationGetDimFaces() 43 Type_t *type = (Type_t *)alloc->mHal.state.type; in rsAllocationGetElement() 44 rs_element returnElem = {type->mHal.state.element}; in rsAllocationGetElement() 110 uint8_t *p = (uint8_t *)alloc->mHal.drvState.lod[0].mallocPtr; in rsOffset() 112 const uint32_t stride = (uint32_t)alloc->mHal.drvState.lod[0].stride; in rsOffset() 113 const uint32_t dimY = alloc->mHal.drvState.lod[0].dimY; in rsOffset() [all …]
|
D | rs_mesh.c | 16 return mesh->mHal.state.vertexBuffersCount; in rsgMeshGetVertexAllocationCount() 25 return mesh->mHal.state.primitivesCount; in rsgMeshGetPrimitiveCount() 31 if (mesh == NULL || index >= mesh->mHal.state.vertexBuffersCount) { in rsgMeshGetVertexAllocation() 35 rs_allocation returnAlloc = {mesh->mHal.state.vertexBuffers[index]}; in rsgMeshGetVertexAllocation() 42 if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) { in rsgMeshGetIndexAllocation() 46 rs_allocation returnAlloc = {mesh->mHal.state.indexBuffers[index]}; in rsgMeshGetIndexAllocation() 53 if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) { in rsgMeshGetPrimitive() 56 return mesh->mHal.state.primitives[index]; in rsgMeshGetPrimitive()
|