diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_surface.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 850d70715e5..22c653f0c4f 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1141,10 +1141,12 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, AddrSurfInfoIn.flags.stencil = 1; AddrSurfInfoIn.bpp = 8; - if (!AddrSurfInfoIn.flags.depth) + if (!AddrSurfInfoIn.flags.depth) { r = gfx9_get_preferred_swizzle_mode(addrlib, &AddrSurfInfoIn, false, &AddrSurfInfoIn.swizzleMode); - else + if (r) + return r; + } else AddrSurfInfoIn.flags.depth = 0; r = gfx9_compute_miptree(addrlib, surf, compressed, &AddrSurfInfoIn); |