<div dir="auto">Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><div dir="auto"><br></div><div dir="auto">M.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2017 7:47 AM, "Nicolai Hähnle" <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
<br>
CID: 1418140<br>
Fixes: c4ac522511d2 ("ac/surface: handle S8 on gfx9")<br>
---<br>
src/amd/common/ac_surface.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c<br>
index 850d70715e5..22c653f0c4f 100644<br>
--- a/src/amd/common/ac_surface.c<br>
+++ b/src/amd/common/ac_surface.c<br>
@@ -1134,24 +1134,26 @@ static int gfx9_compute_surface(ADDR_<wbr>HANDLE addrlib,<br>
/* Calculate texture layout information. */<br>
r = gfx9_compute_miptree(addrlib, surf, compressed, &AddrSurfInfoIn);<br>
if (r)<br>
return r;<br>
<br>
/* Calculate texture layout information for stencil. */<br>
if (surf->flags & RADEON_SURF_SBUFFER) {<br>
AddrSurfInfoIn.flags.stencil = 1;<br>
AddrSurfInfoIn.bpp = 8;<br>
<br>
- if (!AddrSurfInfoIn.flags.depth)<br>
+ if (!AddrSurfInfoIn.flags.depth) {<br>
r = gfx9_get_preferred_swizzle_<wbr>mode(addrlib, &AddrSurfInfoIn, false,<br>
&AddrSurfInfoIn.swizzleMode);<br>
- else<br>
+ if (r)<br>
+ return r;<br>
+ } else<br>
AddrSurfInfoIn.flags.depth = 0;<br>
<br>
r = gfx9_compute_miptree(addrlib, surf, compressed, &AddrSurfInfoIn);<br>
if (r)<br>
return r;<br>
}<br>
<br>
surf->is_linear = surf->u.gfx9.surf.swizzle_mode == ADDR_SW_LINEAR;<br>
<br>
switch (surf->u.gfx9.surf.swizzle_<wbr>mode) {<br>
<font color="#888888">--<br>
2.11.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></blockquote></div><br></div>