freedreno: align renderonly scanout buffers
authorJonathan Marek <jonathan@marek.ca>
Thu, 1 Aug 2019 16:42:33 +0000 (12:42 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 2 Aug 2019 15:58:22 +0000 (15:58 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/freedreno_resource.c

index 3c411f5bc152d627c1f07a807701f92116b444fa..4d188c24d64e7b1b166547d2a077d853bfd111a4 100644 (file)
@@ -918,6 +918,9 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
                struct renderonly_scanout *scanout;
                struct winsys_handle handle;
 
+               /* apply freedreno alignment requirement */
+               scanout_templat.width0 = align(tmpl->width0, screen->gmem_alignw);
+
                scanout = renderonly_scanout_for_resource(&scanout_templat,
                                                                                                  screen->ro, &handle);
                if (!scanout)