Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 104) sorted by relevance

12345

/frameworks/rs/driver/
DrsdAllocation.cpp87 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 …]
DrsdAllocation.h81 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/
Dandroid_rscompat_usage_io_driver.cpp15 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()
29alloc->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 …]
Dandroid_rscompat_usage_io.cpp9 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/
DUT_alloc_copyPadded.java93 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 …]
DUT_alloc_copy.java68 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 …]
DUT_apitest.java46 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/
DUT_alloc_copyPadded.java96 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 …]
DUT_alloc_copy.java72 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 …]
DUT_apitest.java49 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/
DUT_alloc_copyPadded.java94 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 …]
DUT_fp16.java30 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 …]
DUT_alloc_copy.java70 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/
Drs_allocation.c7 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 …]
Drs_sample.c268 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/
Drs_hal.h221 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 …]
DrsAllocation.cpp42 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 …]
DrsProgram.cpp152 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/
DrsCpuIntrinsicYuvToRGB.cpp44 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/
DMainActivity.java66 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/
DC2Buffer.cpp124 _C2Block1DImpl(const std::shared_ptr<C2LinearAllocation> &alloc, in _C2Block1DImpl() argument
127 : _C2LinearRangeAspect(alloc.get(), offset, size), in _C2Block1DImpl()
128 mAllocation(alloc), in _C2Block1DImpl()
340 std::shared_ptr<C2LinearAllocation> alloc; in fetchLinearBlock() local
341 c2_status_t err = mAllocator->newLinearAllocation(capacity, usage, &alloc); in fetchLinearBlock()
346 *block = _C2BlockFactory::CreateLinearBlock(alloc); in fetchLinearBlock()
382 const std::shared_ptr<C2LinearAllocation> &alloc, in CreateLinearBlock() argument
385 std::make_shared<C2Block1D::Impl>(alloc, data, offset, size); in CreateLinearBlock()
413 std::shared_ptr<C2LinearAllocation> alloc; in CreateLinearBlock() local
415 c2_status_t err = sAllocator->priorLinearAllocation(handle, &alloc); in CreateLinearBlock()
[all …]
/frameworks/rs/support/java/src/androidx/renderscript/
DRenderScript.java426 native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument
427 synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument
429 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap()
433 native void rsnAllocationSyncAll(long con, long alloc, int src); in rsnAllocationSyncAll() argument
434 synchronized void nAllocationSyncAll(long alloc, int src) { in nAllocationSyncAll() argument
436 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll()
439 native void rsnAllocationSetSurface(long con, long alloc, Surface sur); in rsnAllocationSetSurface() argument
440 synchronized void nAllocationSetSurface(long alloc, Surface sur) { in nAllocationSetSurface() argument
442 rsnAllocationSetSurface(mContext, alloc, sur); in nAllocationSetSurface()
445 native void rsnAllocationIoSend(long con, long alloc); in rsnAllocationIoSend() argument
[all …]
/frameworks/base/rs/java/android/renderscript/
DRenderScript.java478 native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp); in rsnAllocationCopyToBitmap() argument
479 synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) { in nAllocationCopyToBitmap() argument
481 rsnAllocationCopyToBitmap(mContext, alloc, bmp); in nAllocationCopyToBitmap()
484 native void rsnAllocationSyncAll(long con, long alloc, int src); in rsnAllocationSyncAll() argument
485 synchronized void nAllocationSyncAll(long alloc, int src) { in nAllocationSyncAll() argument
487 rsnAllocationSyncAll(mContext, alloc, src); in nAllocationSyncAll()
490 native ByteBuffer rsnAllocationGetByteBuffer(long con, long alloc, long[] stride, in rsnAllocationGetByteBuffer() argument
492 synchronized ByteBuffer nAllocationGetByteBuffer(long alloc, long[] stride, int xBytesSize, in nAllocationGetByteBuffer() argument
495 return rsnAllocationGetByteBuffer(mContext, alloc, stride, xBytesSize, dimY, dimZ); in nAllocationGetByteBuffer()
498 native void rsnAllocationSetupBufferQueue(long con, long alloc, int numAlloc); in rsnAllocationSetupBufferQueue() argument
[all …]
/frameworks/base/libs/hwui/tests/unit/
DLinearAllocatorTests.cpp33 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/
DUT_apitest.java47 Allocation alloc = Allocation.createTyped(pRS, type); in run() local
52 s.set_allocNonNull(alloc); in run()
56 s.bind_allocPtr(alloc); in run()

12345