Allocation copy functions.
Change-Id: Idce6d44a4f4bb2e399284a40c0f90dc1bff912fd
diff --git a/libs/rs/driver/rsdAllocation.cpp b/libs/rs/driver/rsdAllocation.cpp
index 2e13e9d..8bfc185 100644
--- a/libs/rs/driver/rsdAllocation.cpp
+++ b/libs/rs/driver/rsdAllocation.cpp
@@ -378,6 +378,32 @@
}
+void rsdAllocationData1D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstLod, uint32_t count,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcLod){
+}
+
+void rsdAllocationData2D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstYoff, uint32_t dstLod,
+ RsAllocationCubemapFace dstFace, uint32_t w, uint32_t h,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcYoff, uint32_t srcLod,
+ RsAllocationCubemapFace srcFace) {
+}
+
+void rsdAllocationData3D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstYoff, uint32_t dstZoff,
+ uint32_t dstLod, RsAllocationCubemapFace dstFace,
+ uint32_t w, uint32_t h, uint32_t d,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcYoff, uint32_t srcZoff,
+ uint32_t srcLod, RsAllocationCubemapFace srcFace) {
+}
+
void rsdAllocationElementData1D(const Context *rsc, const Allocation *alloc,
uint32_t x,
const void *data, uint32_t cIdx, uint32_t sizeBytes) {
diff --git a/libs/rs/driver/rsdAllocation.h b/libs/rs/driver/rsdAllocation.h
index d7385ce..7555c4a 100644
--- a/libs/rs/driver/rsdAllocation.h
+++ b/libs/rs/driver/rsdAllocation.h
@@ -80,6 +80,27 @@
uint32_t lod, RsAllocationCubemapFace face,
uint32_t w, uint32_t h, uint32_t d, const void *data, uint32_t sizeBytes);
+void rsdAllocationData1D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstLod, uint32_t count,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcLod);
+void rsdAllocationData2D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstYoff, uint32_t dstLod,
+ RsAllocationCubemapFace dstFace, uint32_t w, uint32_t h,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcYoff, uint32_t srcLod,
+ RsAllocationCubemapFace srcFace);
+void rsdAllocationData3D_alloc(const android::renderscript::Context *rsc,
+ const android::renderscript::Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstYoff, uint32_t dstZoff,
+ uint32_t dstLod, RsAllocationCubemapFace dstFace,
+ uint32_t w, uint32_t h, uint32_t d,
+ const android::renderscript::Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcYoff, uint32_t srcZoff,
+ uint32_t srcLod, RsAllocationCubemapFace srcFace);
+
void rsdAllocationElementData1D(const android::renderscript::Context *rsc,
const android::renderscript::Allocation *alloc,
uint32_t x,
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp
index 01cc369..38f6895 100644
--- a/libs/rs/driver/rsdCore.cpp
+++ b/libs/rs/driver/rsdCore.cpp
@@ -74,6 +74,9 @@
rsdAllocationData1D,
rsdAllocationData2D,
rsdAllocationData3D,
+ rsdAllocationData1D_alloc,
+ rsdAllocationData2D_alloc,
+ rsdAllocationData3D_alloc,
rsdAllocationElementData1D,
rsdAllocationElementData2D
},
diff --git a/libs/rs/driver/rsdRuntimeStubs.cpp b/libs/rs/driver/rsdRuntimeStubs.cpp
index 9cbff95..bd8b3c3 100644
--- a/libs/rs/driver/rsdRuntimeStubs.cpp
+++ b/libs/rs/driver/rsdRuntimeStubs.cpp
@@ -88,6 +88,26 @@
rsrAllocationSyncAll(rsc, sc, a, RS_ALLOCATION_USAGE_SCRIPT);
}
+static void SC_AllocationCopy1DRange(Allocation *dstAlloc,
+ uint32_t dstOff,
+ uint32_t dstMip,
+ uint32_t count,
+ Allocation *srcAlloc,
+ uint32_t srcOff, uint32_t srcMip) {
+ GET_TLS();
+}
+
+static void SC_AllocationCopy2DRange(Allocation *dstAlloc,
+ uint32_t dstXoff, uint32_t dstYoff,
+ uint32_t dstMip, uint32_t dstFace,
+ uint32_t width, uint32_t height,
+ Allocation *srcAlloc,
+ uint32_t srcXoff, uint32_t srcYoff,
+ uint32_t srcMip, uint32_t srcFace) {
+ GET_TLS();
+}
+
+
const Allocation * SC_getAllocation(const void *ptr) {
GET_TLS();
return rsrGetAllocation(rsc, sc, ptr);
@@ -566,8 +586,11 @@
{ "_Z21rsAllocationMarkDirty13rs_allocation", (void *)&SC_AllocationSyncAll, true },
{ "_Z20rsgAllocationSyncAll13rs_allocation", (void *)&SC_AllocationSyncAll, false },
{ "_Z20rsgAllocationSyncAll13rs_allocationj", (void *)&SC_AllocationSyncAll2, false },
+ { "_Z20rsgAllocationSyncAll13rs_allocation24rs_allocation_usage_type", (void *)&SC_AllocationSyncAll2, false },
{ "_Z15rsGetAllocationPKv", (void *)&SC_GetAllocation, true },
+ { "_Z23rsAllocationCopy1DRange13rs_allocationjjjS_jj", (void *)&SC_AllocationCopy1DRange, false },
+ { "_Z23rsAllocationCopy2DRange13rs_allocationjjj26rs_allocation_cubemap_facejjS_jjjS0_", (void *)&SC_AllocationCopy2DRange, false },
// Messaging