summaryrefslogtreecommitdiff
path: root/libs/rs/rsScriptC_Lib.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-06-14 11:13:19 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-06-14 11:13:19 -0700
commit304b1f5497155bcf91e7b855cfab7a675e80bf26 (patch)
tree3a73f3855d29591f9b74f4967d594ec2476262b1 /libs/rs/rsScriptC_Lib.cpp
parentbd3e537980027f4502a13c204b3c7b9d10adad31 (diff)
Allocation copy functions.
Change-Id: Idce6d44a4f4bb2e399284a40c0f90dc1bff912fd
Diffstat (limited to 'libs/rs/rsScriptC_Lib.cpp')
-rw-r--r--libs/rs/rsScriptC_Lib.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 4ee0a3ec4e5e..ec15bc0233a5 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -164,6 +164,29 @@ void rsrAllocationSyncAll(Context *rsc, Script *sc, Allocation *a, RsAllocationU
a->syncAll(rsc, usage);
}
+void rsrAllocationCopy1DRange(Context *rsc, Allocation *dstAlloc,
+ uint32_t dstOff,
+ uint32_t dstMip,
+ uint32_t count,
+ Allocation *srcAlloc,
+ uint32_t srcOff, uint32_t srcMip) {
+ rsi_AllocationCopy2DRange(rsc, dstAlloc, dstOff, 0,
+ dstMip, 0, count, 1,
+ srcAlloc, srcOff, 0, srcMip, 0);
+}
+
+void rsrAllocationCopy2DRange(Context *rsc, 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) {
+ rsi_AllocationCopy2DRange(rsc, dstAlloc, dstXoff, dstYoff,
+ dstMip, dstFace, width, height,
+ srcAlloc, srcXoff, srcYoff, srcMip, srcFace);
+}
+
const Allocation * rsrGetAllocation(Context *rsc, Script *s, const void *ptr) {
ScriptC *sc = (ScriptC *)s;
return sc->ptrToAllocation(ptr);