Update structs and defines for 64-bit.
Also adds RS_FIND_OFFSETS, which prints address info for various types that allow us to easily update __pad.
Change-Id: I4d57248e155d113c83ff69f4f8f64160aa24fb9b
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index f488b55..05951b9 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -463,6 +463,13 @@
rsdAllocationData2D(rsc, alloc, 0, 0, 0, RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X, alloc->getType()->getDimX(), alloc->getType()->getDimY(), alloc->mHal.state.userProvidedPtr, allocSize, 0);
}
+
+#ifdef RS_FIND_OFFSETS
+ ALOGE("pointer for allocation: %p", alloc);
+ ALOGE("pointer for allocation.drv: %p", &alloc->mHal.drv);
+#endif
+
+
return true;
}
diff --git a/driver/runtime/rs_structs.h b/driver/runtime/rs_structs.h
index 80c129c..e35cd54 100644
--- a/driver/runtime/rs_structs.h
+++ b/driver/runtime/rs_structs.h
@@ -25,7 +25,11 @@
} rs_allocation_mipmap_control;
typedef struct Allocation {
+#ifndef __LP64__
char __pad[32];
+#else
+ char __pad[56];
+#endif
struct {
void * drv;
struct {
@@ -145,7 +149,11 @@
*
*****************************************************************************/
typedef struct Sampler {
+#ifndef __LP64__
char __pad[32];
+#else
+ char __pad[56];
+#endif
struct {
void *drv;
struct {
@@ -177,7 +185,11 @@
*
*****************************************************************************/
typedef struct Element {
+#ifndef __LP64__
char __pad[32];
+#else
+ char __pad[56];
+#endif
struct {
void *drv;
struct {
@@ -215,7 +227,11 @@
*
*****************************************************************************/
typedef struct Type {
+#ifndef __LP64__
char __pad[32];
+#else
+ char __pad[56];
+#endif
struct {
void *drv;
struct {