summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r--libs/rs/rsAllocation.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 5ec73d7..ad9c739 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -120,6 +120,11 @@ void Allocation::data(const void *data)
memcpy(mPtr, data, mType->getSizeBytes());
}
+void Allocation::read(void *data)
+{
+ memcpy(data, mPtr, mType->getSizeBytes());
+}
+
void Allocation::subData(uint32_t xoff, uint32_t count, const void *data)
{
uint32_t eSize = mType->getElementSizeBytes();
@@ -523,6 +528,12 @@ void rsi_Allocation2DSubData(Context *rsc, RsAllocation va, uint32_t xoff, uint3
rsc->allocationCheck(a);
}
+void rsi_AllocationRead(Context *rsc, RsAllocation va, void *data)
+{
+ Allocation *a = static_cast<Allocation *>(va);
+ a->read(data);
+}
+
}
}