diff options
author | Nicolai Hähnle <[email protected]> | 2017-09-20 16:45:48 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-09-21 11:00:00 +0200 |
commit | eb71394ff38d05a42cb8d04fedb6539cc7bbe6fa (patch) | |
tree | 8400def8335b1fd776f9600e451983a58656ba40 /src | |
parent | 34126ed248482b630ca567e4cdb05d4dc1ba016c (diff) |
ac/surface: handle error when choosing preferred swizzle mode
CID: 1418140
Fixes: c4ac522511d2 ("ac/surface: handle S8 on gfx9")
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
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); |