summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-03-03 00:58:05 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-03 00:58:06 +0000
commit28847289a9052522d4f8d25b6fc47c3ca51286c3 (patch)
tree8aa1de70f73e824a4ec95d49e68748d3372e83ea
parent640279e73b6128a83e4e0801f43334ae5ef3ccf6 (diff)
parenta814de97f42dc3d9d58a73b282e49dca0951fccb (diff)
downloadrs-28847289a9052522d4f8d25b6fc47c3ca51286c3.tar.gz
Merge "Bug fix: AllocationData3D & AllocationRead3D cannot handle z sections correctly. (use count 'd' where 'd + zoff' should be used)"
-rw-r--r--driver/rsdAllocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index 33a1b119..eb577605 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -934,7 +934,7 @@ void rsdAllocationData3D(const Context *rsc, const Allocation *alloc,
if (alloc->mHal.drvState.lod[0].mallocPtr) {
const uint8_t *src = static_cast<const uint8_t *>(data);
- for (uint32_t z = zoff; z < d; z++) {
+ for (uint32_t z = zoff; z < (d + zoff); z++) {
uint8_t *dst = GetOffsetPtr(alloc, xoff, yoff, z, lod,
RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X);
if (dst == src) {
@@ -1011,7 +1011,7 @@ void rsdAllocationRead3D(const Context *rsc, const Allocation *alloc,
if (alloc->mHal.drvState.lod[0].mallocPtr) {
uint8_t *dst = static_cast<uint8_t *>(data);
- for (uint32_t z = zoff; z < d; z++) {
+ for (uint32_t z = zoff; z < (d + zoff); z++) {
const uint8_t *src = GetOffsetPtr(alloc, xoff, yoff, z, lod,
RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X);
if (dst == src) {