/frameworks/rs/ |
D | rsProgram.cpp | 30 mHal.state.inputElementsCount++; in Program() 33 mHal.state.constantsCount++; in Program() 36 mHal.state.texturesCount++; in Program() 40 mTextures = new ObjectBaseRef<Allocation>[mHal.state.texturesCount]; in Program() 41 mSamplers = new ObjectBaseRef<Sampler>[mHal.state.texturesCount]; in Program() 42 mInputElements = new ObjectBaseRef<Element>[mHal.state.inputElementsCount]; in Program() 43 mConstantTypes = new ObjectBaseRef<Type>[mHal.state.constantsCount]; in Program() 44 mConstants = new ObjectBaseRef<Allocation>[mHal.state.constantsCount]; in Program() 46 mHal.state.textures = new Allocation*[mHal.state.texturesCount]; in Program() 47 mHal.state.samplers = new Sampler*[mHal.state.texturesCount]; in Program() [all …]
|
D | rsType.cpp | 23 memset(&mHal, 0, sizeof(mHal)); in Type() 41 if (mHal.state.lodCount) { in clear() 42 delete [] mHal.state.lodDimX; in clear() 43 delete [] mHal.state.lodDimY; in clear() 44 delete [] mHal.state.lodDimZ; in clear() 45 delete [] mHal.state.lodOffset; in clear() 48 memset(&mHal, 0, sizeof(mHal)); in clear() 59 rsAssert(mHal.state.faces); in getOffsetForFace() 64 uint32_t oldLODCount = mHal.state.lodCount; in compute() 66 uint32_t l2x = rsFindHighBit(mHal.state.dimX) + 1; in compute() [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 | rsAllocation.cpp | 32 memset(&mHal, 0, sizeof(mHal)); in Allocation() 33 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE; in Allocation() 34 mHal.state.usageFlags = usages; in Allocation() 35 mHal.state.mipmapControl = mc; in Allocation() 45 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) { in createAllocation() 55 const Type *type = mHal.state.type; in updateCache() 56 mHal.state.dimensionX = type->getDimX(); in updateCache() 57 mHal.state.dimensionY = type->getDimY(); in updateCache() 58 mHal.state.dimensionZ = type->getDimZ(); in updateCache() 59 mHal.state.hasFaces = type->getDimFaces(); in updateCache() [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 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 | rsProgramVertex.cpp | 30 mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader.string(), mUserShader.length(), 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 | 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 | 56 Hal mHal; variable 66 uint32_t getDimX() const {return mHal.state.dimX;} in getDimX() 67 uint32_t getDimY() const {return mHal.state.dimY;} in getDimY() 68 uint32_t getDimZ() const {return mHal.state.dimZ;} in getDimZ() 70 bool getDimFaces() const {return mHal.state.faces;} in getDimFaces() 73 rsAssert(lod < mHal.state.lodCount); in getLODDimX() 74 return mHal.state.lodDimX[lod]; in getLODDimX() 77 rsAssert(lod < mHal.state.lodCount); in getLODDimY() 78 return mHal.state.lodDimY[lod]; in getLODDimY() 81 rsAssert(lod < mHal.state.lodCount); in getLODDimZ() [all …]
|
/frameworks/support/renderscript/v8/rs_support/ |
D | rsType.cpp | 23 memset(&mHal, 0, sizeof(mHal)); in Type() 41 if (mHal.state.lodCount) { in clear() 42 delete [] mHal.state.lodDimX; in clear() 43 delete [] mHal.state.lodDimY; in clear() 44 delete [] mHal.state.lodDimZ; in clear() 45 delete [] mHal.state.lodOffset; in clear() 48 memset(&mHal, 0, sizeof(mHal)); in clear() 59 rsAssert(mHal.state.faces); in getOffsetForFace() 64 uint32_t oldLODCount = mHal.state.lodCount; in compute() 66 uint32_t l2x = rsFindHighBit(mHal.state.dimX) + 1; in compute() [all …]
|
D | rsAllocation.cpp | 29 memset(&mHal, 0, sizeof(mHal)); in Allocation() 30 mHal.state.mipmapControl = RS_ALLOCATION_MIPMAP_NONE; in Allocation() 31 mHal.state.usageFlags = usages; in Allocation() 32 mHal.state.mipmapControl = mc; in Allocation() 42 if (!rsc->mHal.funcs.allocation.init(rsc, a, type->getElement()->getHasReferences())) { in createAllocation() 52 const Type *type = mHal.state.type; in updateCache() 53 mHal.state.dimensionX = type->getDimX(); in updateCache() 54 mHal.state.dimensionY = type->getDimY(); in updateCache() 55 mHal.state.dimensionZ = type->getDimZ(); in updateCache() 56 mHal.state.hasFaces = type->getDimFaces(); in updateCache() [all …]
|
D | rsScriptC.cpp | 35 mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this); in ~ScriptC() 36 mRSC->mHal.funcs.script.destroy(mRSC, this); in ~ScriptC() 44 for (uint32_t ct=0; ct < mHal.info.exportedVariableCount; ct++) { in setupScript() 51 rsc->mHal.funcs.script.setGlobalBind(rsc, this, ct, mSlots[ct].get()); in setupScript() 59 if (mHal.info.root == NULL) { in run() 70 ALOGV("%p ScriptC::run invoking root, ptr %p", rsc, mHal.info.root); in run() 73 ret = rsc->mHal.funcs.script.invokeRoot(rsc, this); in run() 95 rsc->mHal.funcs.script.invokeForEach(rsc, this, slot, ain, aout, usr, usrBytes, sc); in runForEach() 99 if (slot >= mHal.info.exportedFunctionCount) { in Invoke() 108 rsc->mHal.funcs.script.invokeFunction(rsc, this, slot, data, len); in Invoke() [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 | 56 Hal mHal; variable 66 uint32_t getDimX() const {return mHal.state.dimX;} in getDimX() 67 uint32_t getDimY() const {return mHal.state.dimY;} in getDimY() 68 uint32_t getDimZ() const {return mHal.state.dimZ;} in getDimZ() 70 bool getDimFaces() const {return mHal.state.faces;} in getDimFaces() 73 rsAssert(lod < mHal.state.lodCount); in getLODDimX() 74 return mHal.state.lodDimX[lod]; in getLODDimX() 77 rsAssert(lod < mHal.state.lodCount); in getLODDimY() 78 return mHal.state.lodDimY[lod]; in getLODDimY() 81 rsAssert(lod < mHal.state.lodCount); in getLODDimZ() [all …]
|
/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 | 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 | rsdAllocation.cpp | 83 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in GetOffsetPtr() 87 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr() 95 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture() 101 if (alloc->mHal.state.hasFaces) { in Update2DTexture() 109 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Upload2DTexture() 115 if (alloc->mHal.state.hasFaces) { in Upload2DTexture() 121 for (uint32_t lod = 0; lod < alloc->mHal.state.type->getLODCount(); lod++) { in Upload2DTexture() 125 if (alloc->mHal.state.hasFaces) { in Upload2DTexture() 131 alloc->mHal.state.type->getLODDimX(lod), in Upload2DTexture() 132 alloc->mHal.state.type->getLODDimY(lod), in Upload2DTexture() [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 | 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/compile/libbcc/lib/Renderscript/runtime/ |
D | rs_allocation.c | 9 return alloc->mHal.state.dimensionX; in rsAllocationGetDimX() 15 return alloc->mHal.state.dimensionY; in rsAllocationGetDimY() 21 return alloc->mHal.state.dimensionZ; in rsAllocationGetDimZ() 27 return alloc->mHal.state.hasMipmaps; in rsAllocationGetDimLOD() 33 return alloc->mHal.state.hasFaces; in rsAllocationGetDimFaces() 39 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.mallocPtr; in rsGetElementAt() 40 const uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsGetElementAt() 47 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.mallocPtr; in rsGetElementAt() 48 const uint32_t eSize = alloc->mHal.state.elementSizeBytes; in rsGetElementAt() 49 const uint32_t stride = alloc->mHal.drvState.stride; in rsGetElementAt() [all …]
|
D | rs_element.c | 14 return element->mHal.state.fieldsCount; in rsElementGetSubElementCount() 20 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElement() 24 rs_element returnElem = {element->mHal.state.fields[index]}; in rsElementGetSubElement() 31 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElementNameLength() 34 return element->mHal.state.fieldNameLengths[index]; in rsElementGetSubElementNameLength() 40 if (element == NULL || index >= element->mHal.state.fieldsCount || in rsElementGetSubElementName() 45 uint32_t numToCopy = element->mHal.state.fieldNameLengths[index]; in rsElementGetSubElementName() 52 const char *nameSource = element->mHal.state.fieldNames[index]; in rsElementGetSubElementName() 62 if (element == NULL || index >= element->mHal.state.fieldsCount) { in rsElementGetSubElementArraySize() 65 return element->mHal.state.fieldArraySizes[index]; in rsElementGetSubElementArraySize() [all …]
|
D | rs_program.c | 14 return prog->mHal.state.depthFunc; in rsgProgramStoreGetDepthFunc() 23 return prog->mHal.state.depthWriteEnable; in rsgProgramStoreIsDepthMaskEnabled() 32 return prog->mHal.state.colorRWriteEnable; in rsgProgramStoreIsColorMaskRedEnabled() 41 return prog->mHal.state.colorGWriteEnable; in rsgProgramStoreIsColorMaskGreenEnabled() 50 return prog->mHal.state.colorBWriteEnable; in rsgProgramStoreIsColorMaskBlueEnabled() 59 return prog->mHal.state.colorAWriteEnable; in rsgProgramStoreIsColorMaskAlphaEnabled() 68 return prog->mHal.state.blendSrc; in rsgProgramStoreGetBlendSrcFunc() 77 return prog->mHal.state.blendDst; in rsgProgramStoreGetBlendDstFunc() 86 return prog->mHal.state.ditherEnable; in rsgProgramStoreIsDitherEnabled() 98 return prog->mHal.state.pointSprite; in rsgProgramRasterIsPointSpriteEnabled() [all …]
|
/frameworks/support/renderscript/v8/rs_support/driver/ |
D | rsdAllocation.cpp | 43 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in GetOffsetPtr() 47 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr() 70 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in AllocationBuildPointerTable() 105 alloc->mHal.drvState.strideLOD0 = drv->lod[0].stride; in AllocationBuildPointerTable() 106 alloc->mHal.drvState.mallocPtrLOD0 = ptr; in AllocationBuildPointerTable() 121 alloc->mHal.drv = drv; in rsdAllocationInit() 126 ALOGE("alloc usage %i", alloc->mHal.state.usageFlags); in rsdAllocationInit() 129 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT) { in rsdAllocationInit() 145 if (alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE) { in rsdAllocationInit() 146 if (alloc->mHal.state.hasFaces) { in rsdAllocationInit() [all …]
|