summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarcus Oakland <marcus.oakland@arm.com>2013-06-05 16:32:29 +0100
committerDavid Butcher <david.butcher@arm.com>2013-12-10 18:13:26 +0000
commit605356416088e369f2c9279ed3b7dc989f9dea44 (patch)
treeb2ab995c7e9a3e877aef4fb09e6c4b1e8199a631 /include
parent6fec3a23046a3100c2ce1863afdd0191da69cdcc (diff)
downloadsystem_core-605356416088e369f2c9279ed3b7dc989f9dea44.tar.gz
system_core-605356416088e369f2c9279ed3b7dc989f9dea44.tar.bz2
system_core-605356416088e369f2c9279ed3b7dc989f9dea44.zip
AArch64: Correction of struct surface_t
The struct in the union with GGLSurface in struct surface_t assumed that the reserved field, which corresponds to the GGLsizei version field in the GGLSurface structure (where GGLsizei is define as being ssize_t in the system/core/include/pixelflinger/pixelflinger.h header file) is uint32_t. That is appropriate to the 32-bit system but is not appropriate to the 64-bit system, where ssize_t is 64-bits rather than 32-bits. The 32-bit system has also been tested and has no regression because of this change. Change-Id: I5cd84fd4a18fa0e63e27975f7b3d3e95b99cea58 Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/private/pixelflinger/ggl_context.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/private/pixelflinger/ggl_context.h b/include/private/pixelflinger/ggl_context.h
index 4864d5aed..5905b4bdd 100644
--- a/include/private/pixelflinger/ggl_context.h
+++ b/include/private/pixelflinger/ggl_context.h
@@ -340,16 +340,18 @@ struct pixel_t {
struct surface_t {
union {
- GGLSurface s;
+ GGLSurface s;
+ // Keep the following struct field types in line with the corresponding
+ // GGLSurface fields to avoid mismatches leading to errors.
struct {
- uint32_t reserved;
- uint32_t width;
- uint32_t height;
- int32_t stride;
- uint8_t* data;
- uint8_t format;
- uint8_t dirty;
- uint8_t pad[2];
+ GGLsizei reserved;
+ GGLuint width;
+ GGLuint height;
+ GGLint stride;
+ GGLubyte* data;
+ GGLubyte format;
+ GGLubyte dirty;
+ GGLubyte pad[2];
};
};
void (*read) (const surface_t* s, context_t* c,