diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2011-11-15 15:15:21 -0800 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2011-11-15 15:15:21 -0800 |
| commit | 2d1220c27ae91f0b307f283fe66cb767b63dfe38 (patch) | |
| tree | b2a90e5296b22469df9f43d2b0c9097eca90a9ab /rsAllocation.h | |
| parent | 795e405d18a2523ab81bcad47e3256ad66aefb24 (diff) | |
| download | android_frameworks_rs-2d1220c27ae91f0b307f283fe66cb767b63dfe38.tar.gz android_frameworks_rs-2d1220c27ae91f0b307f283fe66cb767b63dfe38.tar.bz2 android_frameworks_rs-2d1220c27ae91f0b307f283fe66cb767b63dfe38.zip | |
Expand RS vector3 types to vector4.
BUG=5609007
The underlying LLVM implementation for vector3 types does this implicitly. If
RS does not adjust its implementation, we will always be misaligned for any
subsequent data after a vector3 type. We previously inserted padding into the
reflected layers from llvm-rs-cc (hence the skip padding part of this change).
We can safely ignore the padding now that the Java/native code is updated to
use the expanded size. The compiler will also need modification to ensure that
we don't mistakenly skip over any end-of-struct padding.
Fixing the 3 component vector padding problem.
Change-Id: If68af42287deb8f4b28addcd19a9fa314656be44
Diffstat (limited to 'rsAllocation.h')
| -rw-r--r-- | rsAllocation.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rsAllocation.h b/rsAllocation.h index 714798aa..4ce863ab 100644 --- a/rsAllocation.h +++ b/rsAllocation.h @@ -135,6 +135,11 @@ protected: private: void freeChildrenUnlocked(); Allocation(Context *rsc, const Type *, uint32_t usages, RsAllocationMipmapControl mc); + + uint32_t getPackedSize() const; + static void writePackedData(const Type *type, uint8_t *dst, const uint8_t *src, bool dstPadded); + void unpackVec3Allocation(const void *data, uint32_t dataSize); + void packVec3Allocation(OStream *stream) const; }; } |
