diff options
author | Jonathan Marek <[email protected]> | 2020-05-12 21:31:52 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-20 18:24:28 +0000 |
commit | bf024c96ad33dccbbd8e823407e085e75171b5a5 (patch) | |
tree | a50c531b3276b2fd60aa40006b4ea4f321aa24fb /src/gallium/drivers/freedreno | |
parent | 4b65fcb067c6f6a34b08d03e40edf62dc0a9472f (diff) |
freedreno/a6xx: don't use gmem_alignw for imported buffers
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4611>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 5d8a5c76f19..93738e20f74 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -855,7 +855,7 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen, struct renderonly_scanout *scanout; struct winsys_handle handle; - /* apply freedreno alignment requirement */ + /* note: alignment is wrong for a6xx */ scanout_templat.width0 = align(tmpl->width0, screen->gmem_alignw); scanout = renderonly_scanout_for_resource(&scanout_templat, @@ -1027,6 +1027,10 @@ fd_resource_from_handle(struct pipe_screen *pscreen, uint32_t pitchalign = fd_screen(pscreen)->gmem_alignw * rsc->layout.cpp; + /* use 64 pitchalign on a6xx where gmem_alignw is not right */ + if (is_a6xx(screen)) + pitchalign = 64 * rsc->layout.cpp; + if ((slice->pitch < align(prsc->width0 * rsc->layout.cpp, pitchalign)) || (slice->pitch & (pitchalign - 1))) goto fail; |