diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2018-01-16 18:57:10 +0100 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2018-03-14 09:06:06 +0100 |
commit | 7c145222bb9628f6ae187636304fa52b464411ab (patch) | |
tree | 2da6a6976c338876ff5534ad23156cb50460fb3e | |
parent | 1568f9fe94f2f43e50b9657da87af143b705dea3 (diff) |
ac_surface: don't apply the 256-byte alignment to staging surfacesuser_stride-v2
Having the over-alignment on staging surfaces breaks the user_stride
mechanism.
This whole thing is a hack. We should really have a generic mechanism for
specifying minimum stride alignments. In the meantime, I'm not sure if
this breaks radv with GFX6/GFX9 hybrid graphics (e.g., pre-gfx9 on Raven).
Cc: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/amd/common/ac_surface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index c5bce0b651..93b75bc48f 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -265,8 +265,11 @@ static int gfx6_compute_level(ADDR_HANDLE addrlib, /* Make GFX6 linear surfaces compatible with GFX9 for hybrid graphics, * because GFX9 needs linear alignment of 256 bytes. + * + * This should not be applied to staging surfaces. */ - if (config->info.levels == 1 && + if ((surf->flags & (RADEON_SURF_SCANOUT | RADEON_SURF_SHAREABLE)) && + config->info.levels == 1 && AddrSurfInfoIn->tileMode == ADDR_TM_LINEAR_ALIGNED && AddrSurfInfoIn->bpp) { unsigned alignment = 256 / (AddrSurfInfoIn->bpp / 8); |