/frameworks/rs/driver/ |
D | rsdAllocation.cpp | 87 uint8_t *GetOffsetPtr(const android::renderscript::Allocation *alloc, in GetOffsetPtr() argument 90 uint8_t *ptr = (uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in GetOffsetPtr() 91 ptr += face * alloc->mHal.drvState.faceOffset; in GetOffsetPtr() 92 ptr += zoff * alloc->mHal.drvState.lod[lod].dimY * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr() 93 ptr += yoff * alloc->mHal.drvState.lod[lod].stride; in GetOffsetPtr() 94 ptr += xoff * alloc->mHal.state.elementSizeBytes; in GetOffsetPtr() 99 static void Update2DTexture(const Context *rsc, const Allocation *alloc, const void *ptr, in Update2DTexture() argument 103 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in Update2DTexture() 109 if (alloc->mHal.state.hasFaces) { in Update2DTexture() 118 static void Upload2DTexture(const Context *rsc, const Allocation *alloc, bool isFirstUpload) { in Upload2DTexture() argument [all …]
|
D | rsdAllocation.h | 81 android::renderscript::Allocation *alloc); 83 android::renderscript::Allocation *alloc, 87 android::renderscript::Allocation *alloc, 91 android::renderscript::Allocation *alloc); 93 android::renderscript::Allocation *alloc); 96 const android::renderscript::Allocation *alloc, 99 const android::renderscript::Allocation *alloc, 102 const android::renderscript::Allocation *alloc); 104 android::renderscript::Allocation *alloc, ANativeWindow *nw); 106 android::renderscript::Allocation *alloc); [all …]
|
/frameworks/rs/support/jni/ |
D | android_rscompat_usage_io_driver.cpp | 15 static bool IoGetBuffer(const Context *rsc, Allocation *alloc, ANativeWindow *nw) { in IoGetBuffer() argument 16 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in IoGetBuffer() 28 alloc->mHal.drvState.lod[0].mallocPtr = dst; in IoGetBuffer() 29 … alloc->mHal.drvState.lod[0].stride = drv->wndBuffer->stride * alloc->mHal.state.elementSizeBytes; in IoGetBuffer() 35 Allocation *alloc = (Allocation *)allocR; in rscAllocationSetSurface() local 36 DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv; in rscAllocationSetSurface() 49 r = ANativeWindow_setBuffersGeometry(nw, alloc->mHal.drvState.lod[0].dimX, in rscAllocationSetSurface() 50 alloc->mHal.drvState.lod[0].dimY, in rscAllocationSetSurface() 57 IoGetBuffer(rsc, alloc, nw); in rscAllocationSetSurface() 71 extern "C" void rscAllocationDestroy(const Context *rsc, Allocation *alloc) { in rscAllocationDestroy() argument [all …]
|
D | android_rscompat_usage_io.cpp | 9 extern "C" void AllocationSetSurface(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc… in AllocationSetSurface() argument 12 con, alloc, sur); in AllocationSetSurface() 18 dispatchTab.AllocationSetSurface(con, alloc, s); in AllocationSetSurface()
|
/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/ |
D | UT_alloc_copyPadded.java | 93 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_1D() local 94 alloc.setAutoPadding(true); in testAllocation_Byte3_1D() 95 alloc.copyFrom(inArray); in testAllocation_Byte3_1D() 96 alloc.copyTo(outArray); in testAllocation_Byte3_1D() 125 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_2D() local 126 alloc.setAutoPadding(true); in testAllocation_Byte3_2D() 127 alloc.copyFrom(inArray); in testAllocation_Byte3_2D() 128 alloc.copyTo(outArray); in testAllocation_Byte3_2D() 158 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_3D() local 159 alloc.setAutoPadding(true); in testAllocation_Byte3_3D() [all …]
|
D | UT_alloc_copy.java | 68 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Byte() local 71 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Byte() 72 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Byte() 110 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Short() local 113 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Short() 114 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Short() 152 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Int() local 155 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Int() 156 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Int() 194 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Float() local [all …]
|
D | UT_apitest.java | 46 Allocation alloc = Allocation.createTyped(pRS, type); in run() local 51 s.set_allocNonNull(alloc); in run() 55 s.bind_allocPtr(alloc); in run()
|
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/ |
D | UT_alloc_copyPadded.java | 96 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_1D() local 97 alloc.setAutoPadding(true); in testAllocation_Byte3_1D() 98 alloc.copyFrom(inArray); in testAllocation_Byte3_1D() 99 alloc.copyTo(outArray); in testAllocation_Byte3_1D() 128 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_2D() local 129 alloc.setAutoPadding(true); in testAllocation_Byte3_2D() 130 alloc.copyFrom(inArray); in testAllocation_Byte3_2D() 131 alloc.copyTo(outArray); in testAllocation_Byte3_2D() 161 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_3D() local 162 alloc.setAutoPadding(true); in testAllocation_Byte3_3D() [all …]
|
D | UT_alloc_copy.java | 72 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Byte() local 75 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Byte() 76 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Byte() 114 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Short() local 117 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Short() 118 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Short() 156 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Int() local 159 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Int() 160 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Int() 198 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Float() local [all …]
|
D | UT_apitest.java | 49 Allocation alloc = Allocation.createTyped(pRS, type); in run() local 54 s.set_allocNonNull(alloc); in run() 58 s.bind_allocPtr(alloc); in run()
|
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/ |
D | UT_alloc_copyPadded.java | 94 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_1D() local 95 alloc.setAutoPadding(true); in testAllocation_Byte3_1D() 96 alloc.copyFrom(inArray); in testAllocation_Byte3_1D() 97 alloc.copyTo(outArray); in testAllocation_Byte3_1D() 126 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_2D() local 127 alloc.setAutoPadding(true); in testAllocation_Byte3_2D() 128 alloc.copyFrom(inArray); in testAllocation_Byte3_2D() 129 alloc.copyTo(outArray); in testAllocation_Byte3_2D() 159 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in testAllocation_Byte3_3D() local 160 alloc.setAutoPadding(true); in testAllocation_Byte3_3D() [all …]
|
D | UT_fp16.java | 30 private Allocation alloc; field in UT_fp16 50 alloc = Allocation.createTyped(RS, type); in initializeGlobals() 55 s.set_gAlloc(alloc); in initializeGlobals() 62 s.forEach_set_kernel_half(alloc); in TestHalf() 66 alloc.destroy(); in TestHalf() 72 s.forEach_verify_kernel_half(alloc); in TestHalf() 75 alloc.destroy(); in TestHalf() 83 s.forEach_set_kernel_half2(alloc); in TestHalf2() 87 alloc.destroy(); in TestHalf2() 93 s.forEach_verify_kernel_half2(alloc); in TestHalf2() [all …]
|
D | UT_alloc_copy.java | 70 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Byte() local 73 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Byte() 74 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Byte() 112 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Short() local 115 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Short() 116 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Short() 154 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Int() local 157 alloc.copy1DRangeFrom(offset, count, inArray); in allocation_copy1DRangeTo_Int() 158 alloc.copy1DRangeTo(offset, count, outArray); in allocation_copy1DRangeTo_Int() 196 Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); in allocation_copy1DRangeTo_Float() local [all …]
|
/frameworks/rs/driver/runtime/ |
D | rs_allocation.c | 7 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimX() local 8 return alloc->mHal.drvState.lod[0].dimX; in rsAllocationGetDimX() 13 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimY() local 14 return alloc->mHal.drvState.lod[0].dimY; in rsAllocationGetDimY() 19 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimZ() local 20 return alloc->mHal.drvState.lod[0].dimZ; in rsAllocationGetDimZ() 25 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimLOD() local 26 return alloc->mHal.state.hasMipmaps; in rsAllocationGetDimLOD() 31 Allocation_t *alloc = (Allocation_t *)a.p; in rsAllocationGetDimFaces() local 32 return alloc->mHal.state.hasFaces; in rsAllocationGetDimFaces() [all …]
|
D | rs_sample.c | 268 getBilinearSample1D(const Allocation_t *alloc, float2 weights, in getBilinearSample1D() argument 272 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getBilinearSample1D() 318 getBilinearSample2D(const Allocation_t *alloc, float w0, float w1, float w2, float w3, in getBilinearSample2D() argument 322 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getBilinearSample2D() 323 size_t stride = alloc->mHal.drvState.lod[lod].stride; in getBilinearSample2D() 348 getNearestSample(const Allocation_t *alloc, uint32_t iPixel, rs_data_kind dk, in getNearestSample() argument 351 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getNearestSample() 385 getNearestSample(const Allocation_t *alloc, uint2 iPixel, rs_data_kind dk, in getNearestSample() argument 388 const uint8_t *p = (const uint8_t *)alloc->mHal.drvState.lod[lod].mallocPtr; in getNearestSample() 389 size_t stride = alloc->mHal.drvState.lod[lod].stride; in getNearestSample() [all …]
|
/frameworks/rs/ |
D | rs_hal.h | 221 bool (*init)(const Context *rsc, Allocation *alloc, bool forceZero); 222 bool (*initOem)(const Context *rsc, Allocation *alloc, bool forceZero, void *usrPtr); 223 bool (*initAdapter)(const Context *rsc, Allocation *alloc); 224 void (*destroy)(const Context *rsc, Allocation *alloc); 225 uint32_t (*grallocBits)(const Context *rsc, Allocation *alloc); 227 void (*resize)(const Context *rsc, const Allocation *alloc, const Type *newType, 229 void (*syncAll)(const Context *rsc, const Allocation *alloc, RsAllocationUsageType src); 230 void (*markDirty)(const Context *rsc, const Allocation *alloc); 232 void (*setSurface)(const Context *rsc, Allocation *alloc, ANativeWindow *sur); 233 void (*ioSend)(const Context *rsc, Allocation *alloc); [all …]
|
D | rsAllocation.cpp | 42 Allocation::Allocation(Context *rsc, const Allocation *alloc, const Type *type) in Allocation() argument 46 mHal.state.baseAlloc = alloc; in Allocation() 47 mHal.state.usageFlags = alloc->mHal.state.usageFlags; in Allocation() 106 Allocation * Allocation::createAdapter(Context *rsc, const Allocation *alloc, const Type *type) { in createAdapter() argument 115 Allocation *a = new (allocMem) Allocation(rsc, alloc, type); in createAdapter() 483 Allocation *alloc = Allocation::createAllocation(rsc, type, RS_ALLOCATION_USAGE_SCRIPT); in createFromStream() local 489 uint32_t packedSize = alloc->getPackedSize(); in createFromStream() 494 ObjectBase::checkDelete(alloc); in createFromStream() 499 alloc->assignName(name); in createFromStream() 503 alloc->data(rsc, 0, 0, count, stream->getPtr() + stream->getPos(), dataSize); in createFromStream() [all …]
|
D | rsProgram.cpp | 152 void Program::bindAllocation(Context *rsc, Allocation *alloc, uint32_t slot) { in bindAllocation() argument 153 if (alloc != nullptr) { in bindAllocation() 160 if (alloc->getType() != mConstantTypes[slot].get()) { in bindAllocation() 167 if (mConstants[slot].get() == alloc) { in bindAllocation() 173 mConstants[slot].set(alloc); in bindAllocation() 174 mHal.state.constants[slot] = alloc; in bindAllocation() 175 if (alloc) { in bindAllocation() 176 alloc->addProgramToDirty(this); in bindAllocation()
|
/frameworks/rs/cpu_ref/ |
D | rsCpuIntrinsicYuvToRGB.cpp | 44 ObjectBaseRef<Allocation> alloc; member in android::renderscript::RsdCpuScriptIntrinsicYuvToRGB 54 alloc.set(static_cast<Allocation *>(data)); in setGlobalObj() 102 if (!cp->alloc.get()) { in kernel() 106 const uchar *pinY = (const uchar *)cp->alloc->mHal.drvState.lod[0].mallocPtr; in kernel() 112 size_t strideY = cp->alloc->mHal.drvState.lod[0].stride; in kernel() 115 if (cp->alloc->mHal.drvState.lod[0].dimY == 0) { in kernel() 124 size_t cstep = cp->alloc->mHal.drvState.yuv.step; in kernel() 126 const uchar *pinU = (const uchar *)cp->alloc->mHal.drvState.lod[1].mallocPtr; in kernel() 127 const size_t strideU = cp->alloc->mHal.drvState.lod[1].stride; in kernel() 130 const uchar *pinV = (const uchar *)cp->alloc->mHal.drvState.lod[2].mallocPtr; in kernel() [all …]
|
/frameworks/rs/tests/lldb/java/Reduction/src/com/android/rs/lldbreductiontest/ |
D | MainActivity.java | 66 RenderScript rs, ScriptC_reduce_auto_comb s, Allocation alloc) { in findMinUserTypeAutoComb() argument 71 return s.reduce_find_min_user_type_auto_comb(alloc).get(); in findMinUserTypeAutoComb() 74 private float findMinUserType(RenderScript rs, ScriptC_reduce s, Allocation alloc) { in findMinUserType() argument 79 return s.reduce_find_min_user_type(alloc).get(); in findMinUserType() 91 Allocation alloc = minUserType.getAllocation(); in findMinUserType1DAutoComb() local 93 return findMinUserTypeAutoComb(rs, s, alloc); in findMinUserType1DAutoComb() 105 Allocation alloc = minUserType.getAllocation(); in findMinUserType1D() local 107 return findMinUserType(rs, s, alloc); in findMinUserType1D()
|
/frameworks/av/media/codec2/vndk/ |
D | C2Buffer.cpp | 123 _C2Block1DImpl(const std::shared_ptr<C2LinearAllocation> &alloc, in _C2Block1DImpl() argument 126 : _C2LinearRangeAspect(alloc.get(), offset, size), in _C2Block1DImpl() 127 mAllocation(alloc), in _C2Block1DImpl() 339 std::shared_ptr<C2LinearAllocation> alloc; in fetchLinearBlock() local 340 c2_status_t err = mAllocator->newLinearAllocation(capacity, usage, &alloc); in fetchLinearBlock() 345 *block = _C2BlockFactory::CreateLinearBlock(alloc); in fetchLinearBlock() 381 const std::shared_ptr<C2LinearAllocation> &alloc, in CreateLinearBlock() argument 384 std::make_shared<C2Block1D::Impl>(alloc, data, offset, size); in CreateLinearBlock() 420 std::shared_ptr<C2LinearAllocation> alloc; in CreateLinearBlock() local 422 c2_status_t err = sAllocator->priorLinearAllocation(handle, &alloc); in CreateLinearBlock() [all …]
|
/frameworks/rs/support/java/src/androidx/renderscript/ |
D | RenderScript.java | 421 native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument 422 synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument 424 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap() 428 native void rsnAllocationSyncAll(long con, long alloc, int src); in rsnAllocationSyncAll() argument 429 synchronized void nAllocationSyncAll(long alloc, int src) { in nAllocationSyncAll() argument 431 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll() 434 native void rsnAllocationSetSurface(long con, long alloc, Surface sur); in rsnAllocationSetSurface() argument 435 synchronized void nAllocationSetSurface(long alloc, Surface sur) { in nAllocationSetSurface() argument 437 rsnAllocationSetSurface(mContext, alloc, sur); in nAllocationSetSurface() 440 native void rsnAllocationIoSend(long con, long alloc); in rsnAllocationIoSend() argument [all …]
|
/frameworks/base/rs/java/android/renderscript/ |
D | RenderScript.java | 473 native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument 474 synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument 476 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap() 479 native void rsnAllocationSyncAll(long con, long alloc, int src); in rsnAllocationSyncAll() argument 480 synchronized void nAllocationSyncAll(long alloc, int src) { in nAllocationSyncAll() argument 482 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll() 485 native ByteBuffer rsnAllocationGetByteBuffer(long con, long alloc, long[] stride, in rsnAllocationGetByteBuffer() argument 487 synchronized ByteBuffer nAllocationGetByteBuffer(long alloc, long[] stride, int xBytesSize, in nAllocationGetByteBuffer() argument 490 return rsnAllocationGetByteBuffer(mContext, alloc, stride, xBytesSize, dimY, dimZ); in nAllocationGetByteBuffer() 493 native void rsnAllocationSetupBufferQueue(long con, long alloc, int numAlloc); in rsnAllocationSetupBufferQueue() argument [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | LinearAllocatorTests.cpp | 33 la.alloc<char>(64); in TEST() 53 la.alloc<char>(100); in TEST() 58 la.alloc<char>(100); in TEST() 72 auto addr = la.alloc<char>(100); in TEST()
|
/frameworks/rs/tests/java_api/RSUnitTests/supportlibonlysrc/com/android/rs/unittest/ |
D | UT_apitest.java | 47 Allocation alloc = Allocation.createTyped(pRS, type); in run() local 52 s.set_allocNonNull(alloc); in run() 56 s.bind_allocPtr(alloc); in run()
|