diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-06-09 11:57:59 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-06-15 17:24:09 +0900 |
commit | bd0aca09770543fa77b934e1728a832c9c2dc90c (patch) | |
tree | a74a2920b0d2fa6730db91dfa5b7c1d4487df626 /src/amdgpu_pixmap.c | |
parent | e5dfb6c2667994701ee451bf82c4142cbf343405 (diff) |
glamor: Remove the stride member of struct radeon_pixmap
Its value was always the same as that of the PixmapRec devKind member.
(Cherry picked from radeon commit ed401f5b4f07375db17ff05e294907ec95fc946d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_pixmap.c')
-rw-r--r-- | src/amdgpu_pixmap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/amdgpu_pixmap.c b/src/amdgpu_pixmap.c index 657ad33..0a1b0b1 100644 --- a/src/amdgpu_pixmap.c +++ b/src/amdgpu_pixmap.c @@ -53,6 +53,8 @@ amdgpu_pixmap_create(ScreenPtr screen, int w, int h, int depth, unsigned usage) return pixmap; if (w && h) { + int stride; + priv = calloc(1, sizeof(struct amdgpu_pixmap)); if (priv == NULL) goto fallback_pixmap; @@ -62,8 +64,8 @@ amdgpu_pixmap_create(ScreenPtr screen, int w, int h, int depth, unsigned usage) if (!info->use_glamor) usage |= AMDGPU_CREATE_PIXMAP_LINEAR; priv->bo = amdgpu_alloc_pixmap_bo(scrn, w, h, depth, usage, - pixmap->drawable.bitsPerPixel, - &priv->stride); + pixmap->drawable.bitsPerPixel, + &stride); if (!priv->bo) goto fallback_priv; @@ -74,9 +76,8 @@ amdgpu_pixmap_create(ScreenPtr screen, int w, int h, int depth, unsigned usage) goto fallback_bo; } - screen->ModifyPixmapHeader(pixmap, w, h, - 0, 0, priv->stride, - priv->bo->cpu_ptr); + screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, + priv->bo->cpu_ptr); } return pixmap; |