/frameworks/rs/driver/ |
rsdFrameBuffer.cpp | 33 RsdFrameBufferObj *fbo = (RsdFrameBufferObj*)fb->mHal.drv; 36 if (fb->mHal.state.depthTarget != nullptr) { 37 depth = (DrvAllocation *)fb->mHal.state.depthTarget->mHal.drv; 40 rsdAllocationSyncAll(rsc, fb->mHal.state.depthTarget, 48 RsdFrameBufferObj *fbo = (RsdFrameBufferObj*)fb->mHal.drv; 50 for (uint32_t i = 0; i < fb->mHal.state.colorTargetsCount; i ++) { 52 if (fb->mHal.state.colorTargets[i] != nullptr) { 53 color = (DrvAllocation *)fb->mHal.state.colorTargets[i]->mHal.drv [all...] |
rsdProgram.cpp | 42 pv->mHal.drv = drv; 48 for (uint32_t ct=0; ct < p->mHal.state.texturesCount; ct++) { 49 const Allocation *a = p->mHal.state.textures[ct]; 53 DrvAllocation *drvAlloc = (DrvAllocation *)a->mHal.drv; 61 RsdHal *dc = (RsdHal *)rsc->mHal.drv; 64 dc->gl.shaderCache->setActiveVertex((RsdShader*)pv->mHal.drv); 68 RsdHal *dc = (RsdHal *)rsc->mHal.drv; 71 if(pv->mHal.drv) { 72 drv = (RsdShader*)pv->mHal.drv; 89 pf->mHal.drv = drv [all...] |
rsdMesh.cpp | 32 if(m->mHal.drv) { 33 drv = (RsdMeshObj*)m->mHal.drv; 37 m->mHal.drv = drv; 42 if(m->mHal.drv) { 43 RsdHal *dc = (RsdHal *)rsc->mHal.drv; 48 RsdMeshObj *drv = (RsdMeshObj*)m->mHal.drv; 54 if(m->mHal.drv) { 55 RsdMeshObj *drv = (RsdMeshObj*)m->mHal.drv;
|
rsdMeshObj.cpp | 55 RsDataType dt = elem->mHal.state.fields[fieldIdx]->mHal.state.dataType; 63 uint32_t arraySize = elem->mHal.state.fieldArraySizes[fieldIdx]; 77 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { 78 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); 79 for (uint32_t ct=0; ct < elem->mHal.state.fieldsCount; ct++) { 100 for (uint32_t ct=0; ct < mRSMesh->mHal.state.vertexBuffersCount; ct++) { 101 const Element *elem = mRSMesh->mHal.state.vertexBuffers[ct]->getType()->getElement(); 102 uint32_t stride = elem->mHal.state.elementSizeBytes; 103 for (uint32_t fieldI=0; fieldI < elem->mHal.state.fieldsCount; fieldI++) [all...] |
rsdProgramStore.cpp | 46 ps->mHal.drv = drv; 49 switch (ps->mHal.state.depthFunc) { 80 if ((ps->mHal.state.blendSrc == RS_BLEND_SRC_ONE) && 81 (ps->mHal.state.blendDst == RS_BLEND_DST_ZERO)) { 85 switch (ps->mHal.state.blendSrc) { 118 switch (ps->mHal.state.blendDst) { 152 ps->mHal.drv = nullptr; 157 DrvProgramStore *drv = (DrvProgramStore *)ps->mHal.drv; 159 RSD_CALL_GL(glColorMask, ps->mHal.state.colorRWriteEnable, 160 ps->mHal.state.colorGWriteEnable [all...] |
rsdAllocation.cpp | 94 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; 95 ptr += face * alloc->mHal.drvState.faceOffset; 96 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride; 97 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; 98 ptr += xoff * alloc->mHal.state.elementSizeBytes; 107 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; 113 if (alloc->mHal.state.hasFaces) { 123 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; 129 if (alloc->mHal.state.hasFaces) [all...] |
rsdScriptGroup.cpp | 32 RsdHal *dc = (RsdHal *)rsc->mHal.drv; 34 sg->mHal.drv = dc->mCpuRef->createScriptGroup(sg); 35 return sg->mHal.drv != nullptr; 48 (RsdCpuReference::CpuScriptGroupBase *)sg->mHal.drv; 54 (RsdCpuReference::CpuScriptGroupBase *)sg->mHal.drv; 66 obj->v1 = sg->mHal.drv;
|
rsdShader.cpp | 81 for (uint32_t ct = 0; ct < mRSProgram->mHal.state.texturesCount; ct ++) { 83 if (mRSProgram->mHal.state.textureTargets[ct] == RS_TEXTURE_2D) { 84 Allocation *a = mRSProgram->mHal.state.textures[ct]; 85 if (a && a->mHal.state.surfaceTextureID) { 121 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) { 122 initAddUserElement(mRSProgram->mHal.state.inputElements[ct], mAttribNames, 125 for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) { 126 initAddUserElement(mRSProgram->mHal.state.constantTypes[ct]->getElement(), 131 for (uint32_t ct=0; ct < mRSProgram->mHal.state.texturesCount; ct++) { 141 for (uint32_t ct=0; ct < mRSProgram->mHal.state.inputElementsCount; ct++) [all...] |
/frameworks/rs/ |
rsDriverLoader.cpp | 62 ret &= fn(RS_HAL_CORE_SHUTDOWN, (void **)&rsc->mHal.funcs.shutdownDriver); 63 ret &= fn(RS_HAL_CORE_SET_PRIORITY, (void **)&rsc->mHal.funcs.setPriority); 64 ret &= fn(RS_HAL_CORE_ALLOC_RUNTIME_MEM, (void **)&rsc->mHal.funcs.allocRuntimeMem); 65 ret &= fn(RS_HAL_CORE_FREE_RUNTIME_MEM, (void **)&rsc->mHal.funcs.freeRuntimeMem); 66 ret &= fn(RS_HAL_CORE_FINISH, (void **)&rsc->mHal.funcs.finish); 68 ret &= fn(RS_HAL_SCRIPT_INIT, (void **)&rsc->mHal.funcs.script.init); 69 ret &= fn(RS_HAL_SCRIPT_INIT_INTRINSIC, (void **)&rsc->mHal.funcs.script.initIntrinsic); 70 ret &= fn(RS_HAL_SCRIPT_INVOKE_FUNCTION, (void **)&rsc->mHal.funcs.script.invokeFunction); 71 ret &= fn(RS_HAL_SCRIPT_INVOKE_ROOT, (void **)&rsc->mHal.funcs.script.invokeRoot); 72 ret &= fn(RS_HAL_SCRIPT_INVOKE_FOR_EACH, (void **)&rsc->mHal.funcs.script.invokeForEach) [all...] |
rsFBOCache.cpp | 28 mHal.state.colorTargetsCount = 1; 29 mHal.state.colorTargets = new Allocation*[mHal.state.colorTargetsCount]; 30 mColorTargets = new ObjectBaseRef<Allocation>[mHal.state.colorTargetsCount]; 35 delete[] mHal.state.colorTargets; 40 rsc->mHal.funcs.framebuffer.init(rsc, this); 44 rsc->mHal.funcs.framebuffer.destroy(rsc, this); 48 if (slot >= mHal.state.colorTargetsCount) { 53 if (!(a->getIsTexture() || (a->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_OUTPUT))) { 59 mHal.state.colorTargets[slot] = a [all...] |
rsMesh.cpp | 25 mHal.drv = nullptr; 26 mHal.state.primitives = nullptr; 27 mHal.state.primitivesCount = 0; 28 mHal.state.indexBuffers = nullptr; 29 mHal.state.indexBuffersCount = 0; 30 mHal.state.vertexBuffers = nullptr; 31 mHal.state.vertexBuffersCount = 0; 41 mHal.drv = nullptr; 42 mHal.state.primitivesCount = primitivesCount; 43 mHal.state.indexBuffersCount = primitivesCount [all...] |
rsProgram.cpp | 32 mHal.state.inputElementsCount++; 35 mHal.state.constantsCount++; 38 mHal.state.texturesCount++; 42 mTextures = new ObjectBaseRef<Allocation>[mHal.state.texturesCount]; 43 mSamplers = new ObjectBaseRef<Sampler>[mHal.state.texturesCount]; 44 mInputElements = new ObjectBaseRef<Element>[mHal.state.inputElementsCount]; 45 mConstantTypes = new ObjectBaseRef<Type>[mHal.state.constantsCount]; 46 mConstants = new ObjectBaseRef<Allocation>[mHal.state.constantsCount]; 48 mHal.state.textures = new Allocation*[mHal.state.texturesCount] [all...] |
rsApiMesh.cpp | 25 *numVtx = sm->mHal.state.vertexBuffersCount; 30 *numIdx = sm->mHal.state.primitivesCount; 35 rsAssert(vtxDataCount == sm->mHal.state.vertexBuffersCount); 38 vtxData[ct] = sm->mHal.state.vertexBuffers[ct]; 39 sm->mHal.state.vertexBuffers[ct]->incUserRef(); 45 rsAssert(idxDataCount == sm->mHal.state.primitivesCount); 48 va[ct] = sm->mHal.state.indexBuffers[ct]; 49 primType[ct] = sm->mHal.state.primitives[ct]; 50 if (sm->mHal.state.indexBuffers[ct]) { 51 sm->mHal.state.indexBuffers[ct]->incUserRef() [all...] |
rsScriptGroup2.cpp | 9 if (mRSC->mHal.funcs.scriptgroup.destroy) { 10 mRSC->mHal.funcs.scriptgroup.destroy(mRSC, this); 15 if (rsc->mHal.funcs.scriptgroup.execute) { 16 rsc->mHal.funcs.scriptgroup.execute(rsc, this); 29 if (rsc->mHal.funcs.scriptgroup.init) { 30 rsc->mHal.funcs.scriptgroup.init(rsc, group);
|
rsType.cpp | 31 memset(&mHal, 0, sizeof(mHal)); 51 t->getContext()->mHal.funcs.freeRuntimeMem(ptr); 56 if (mHal.state.lodCount) { 57 delete [] mHal.state.lodDimX; 58 delete [] mHal.state.lodDimY; 59 delete [] mHal.state.lodDimZ; 61 if (mHal.state.arrayCount > 0) { 62 delete [] mHal.state.arrays; 65 memset(&mHal, 0, sizeof(mHal)) [all...] |
rsProgramStore.cpp | 29 memset(&mHal, 0, sizeof(mHal)); 31 mHal.state.ditherEnable = ditherEnable; 33 mHal.state.colorRWriteEnable = colorMaskR; 34 mHal.state.colorGWriteEnable = colorMaskG; 35 mHal.state.colorBWriteEnable = colorMaskB; 36 mHal.state.colorAWriteEnable = colorMaskA; 37 mHal.state.blendSrc = srcFunc; 38 mHal.state.blendDst = destFunc; 40 mHal.state.depthWriteEnable = depthMask [all...] |
rsGrallocConsumer.cpp | 51 uint32_t y = a->mHal.drvState.lod[0].dimY; 53 mConsumer->setDefaultBufferSize(a->mHal.drvState.lod[0].dimX, y); 55 if (a->mHal.state.yuv) { 56 bq->setDefaultBufferFormat(a->mHal.state.yuv); 147 mAlloc[idx]->mHal.drvState.lod[0].mallocPtr = reinterpret_cast<uint8_t*>(bufferPointer); 148 mAlloc[idx]->mHal.drvState.lod[0].stride = mSlots[slot].mGraphicBuffer->getStride() * 149 mAlloc[idx]->mHal.state.type->getElementSizeBytes(); 150 mAlloc[idx]->mHal.state.nativeBuffer = mAcquiredBuffer[idx].mGraphicBuffer->getNativeBuffer(); 151 mAlloc[idx]->mHal.state.timestamp = b.mTimestamp; 153 rsAssert(mAlloc[idx]->mHal.drvState.lod[0].dimX = [all...] |
rsSampler.cpp | 37 mHal.state.magFilter = magFilter; 38 mHal.state.minFilter = minFilter; 39 mHal.state.wrapS = wrapS; 40 mHal.state.wrapT = wrapT; 41 mHal.state.wrapR = wrapR; 42 mHal.state.aniso = aniso; 44 mRSC->mHal.funcs.sampler.init(mRSC, this); 48 mRSC->mHal.funcs.sampler.destroy(mRSC, this); 89 if (existing->mHal.state.magFilter != magFilter) continue; 90 if (existing->mHal.state.minFilter != minFilter ) continue [all...] |
rsProgramVertex.cpp | 30 mRSC->mHal.funcs.vertex.init(mRSC, this, mUserShader, mUserShaderLen, 35 mRSC->mHal.funcs.vertex.destroy(mRSC, this); 44 if (mHal.state.constants[0] == nullptr) { 49 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D( 50 rsc, mHal.state.constants[0])); 59 rsc->mHal.funcs.allocation.unlock1D(rsc, mHal.state.constants[0]); 64 rsc->mHal.funcs.vertex.setActive(rsc, this); 73 if (mHal.state.constants[0] == nullptr) { 78 float *f = static_cast<float *>(rsc->mHal.funcs.allocation.lock1D [all...] |
rsType.h | 60 Hal mHal; 71 uint32_t getDimX() const {return mHal.state.dimX;} 72 uint32_t getDimY() const {return mHal.state.dimY;} 73 uint32_t getDimZ() const {return mHal.state.dimZ;} 75 bool getDimFaces() const {return mHal.state.faces;} 76 uint32_t getDimYuv() const {return mHal.state.dimYuv;} 78 if (idx < mHal.state.arrayCount) { 79 return mHal.state.arrays[idx]; 85 rsAssert(lod < mHal.state.lodCount); 86 return mHal.state.lodDimX[lod] [all...] |
rsProgramRaster.cpp | 27 memset(&mHal, 0, sizeof(mHal)); 28 mHal.state.pointSprite = pointSprite; 29 mHal.state.cull = cull; 30 rsc->mHal.funcs.raster.init(rsc, this); 43 mRSC->mHal.funcs.raster.destroy(mRSC, this); 53 rsc->mHal.funcs.raster.setActive(rsc, this); 85 if (existing->mHal.state.pointSprite != pointSprite) continue; 86 if (existing->mHal.state.cull != cull) continue;
|
/frameworks/support/v8/renderscript/jni/ |
android_rscompat_usage_io_driver.cpp | 16 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; 28 alloc->mHal.drvState.lod[0].mallocPtr = dst; 29 alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes; 36 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; 49 r = ANativeWindow_setBuffersGeometry(nw, alloc->mHal.drvState.lod[0].dimX, 50 alloc->mHal.drvState.lod[0].dimY, 72 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; 73 if (alloc->mHal.drvState.lod[0].mallocPtr) { 76 !(alloc->mHal.state.usageFlags & RS_ALLOCATION_USAGE_IO_INPUT) & [all...] |
/frameworks/rs/driver/runtime/ |
rs_element.c | 13 return element->mHal.state.fieldsCount; 19 if (element == NULL || index >= element->mHal.state.fieldsCount) { 23 rs_element returnElem = {element->mHal.state.fields[index]}; 32 if (element == NULL || index >= element->mHal.state.fieldsCount) { 35 return element->mHal.state.fieldNameLengths[index]; 41 if (element == NULL || index >= element->mHal.state.fieldsCount || 46 uint32_t numToCopy = element->mHal.state.fieldNameLengths[index]; 53 const char *nameSource = element->mHal.state.fieldNames[index]; 63 if (element == NULL || index >= element->mHal.state.fieldsCount) { 66 return element->mHal.state.fieldArraySizes[index] [all...] |
rs_program.c | 16 return prog->mHal.state.depthFunc; 25 return prog->mHal.state.depthWriteEnable; 34 return prog->mHal.state.colorRWriteEnable; 43 return prog->mHal.state.colorGWriteEnable; 52 return prog->mHal.state.colorBWriteEnable; 61 return prog->mHal.state.colorAWriteEnable; 70 return prog->mHal.state.blendSrc; 79 return prog->mHal.state.blendDst; 88 return prog->mHal.state.ditherEnable; 100 return prog->mHal.state.pointSprite [all...] |
rs_mesh.c | 16 return mesh->mHal.state.vertexBuffersCount; 25 return mesh->mHal.state.primitivesCount; 31 if (mesh == NULL || index >= mesh->mHal.state.vertexBuffersCount) { 35 rs_allocation returnAlloc = {mesh->mHal.state.vertexBuffers[index]}; 44 if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) { 48 rs_allocation returnAlloc = {mesh->mHal.state.indexBuffers[index]}; 57 if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) { 60 return mesh->mHal.state.primitives[index];
|