<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 10, 2018 at 8:10 PM, Bas Nieuwenhuizen <span dir="ltr"><<a href="mailto:bas@basnieuwenhuizen.nl" target="_blank">bas@basnieuwenhuizen.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For dcn1 && < 64 bpp displayable surfaces, addrlib only accepts<br>
S swizzles.<br>
<br>
At the same time addrlib prefers D swizzles is allowed, so we can<br>
just allow S swizzles as fallback.<br>
<br>
Fixes: b64b712558 "ac/surface/gfx9: request desired micro tile mode explicitly"<br>
---<br>
src/amd/common/ac_surface.c | 7 +++++--<br>
1 file changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c<br>
index 1b4d72e31b..7558dd91e3 100644<br>
--- a/src/amd/common/ac_surface.c<br>
+++ b/src/amd/common/ac_surface.c<br>
@@ -865,9 +865,12 @@ gfx9_get_preferred_swizzle_<wbr>mode(ADDR_HANDLE addrlib,<br>
sin.numSamples = in->numSamples;<br>
sin.numFrags = in->numFrags;<br>
<br>
- if (flags & RADEON_SURF_SCANOUT)<br>
+ if (flags & RADEON_SURF_SCANOUT) {<br>
sin.preferredSwSet.sw_D = 1;<br>
- else if (in->flags.depth || in->flags.stencil || is_fmask)<br>
+ /* Raven only allows S for displayable surfaces with < 64 bpp, so<br>
+ * allow it as fallback */<br>
+ sin.preferredSwSet.sw_S = 1;<br>
+ } else if (in->flags.depth || in->flags.stencil || is_fmask)<br>
sin.preferredSwSet.sw_Z = 1;<br>
else<br>
sin.preferredSwSet.sw_S = 1;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.17.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>