mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
freedreno/a6xx: don't use gmem_alignw for imported buffers
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4611>
This commit is contained in:
parent
4b65fcb067
commit
bf024c96ad
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue