summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2018-01-01 20:27:09 +0300
committerDmitry Osipenko <digetx@gmail.com>2018-01-01 20:43:31 +0300
commit3ef8c07ce939d0755cb538863d4f009b7fdfc6ab (patch)
tree747c279c4e5edb8d012f3981221ba19a14c12d89
parent39ae16152aced972c8f70ff4de330a3811f59973 (diff)
Align surface stride to 16 bytes
G2SB require 8 bytes alignment at minimum and 16 bytes at max. This fixes odd 2D blit failures.
-rw-r--r--src/surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/surface.c b/src/surface.c
index 44e5c8f..e632e58 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -85,7 +85,7 @@ int alloc_surface_data(tegra_surface *surf)
XvImage *xv_img = NULL;
struct tegra_vde_h264_frame *frame = NULL;
struct host1x_pixelbuffer *pixbuf = NULL;
- uint32_t stride = width * 4;
+ uint32_t stride = ALIGN(width * 4, 16);
uint32_t *bo_flinks = NULL;
uint32_t *pitches = NULL;
int ret;