ac/surface: sanity-check that we got a TC-compatible HTILE if requested
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 7 Sep 2017 11:20:25 +0000 (13:20 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 13 Sep 2017 16:26:59 +0000 (18:26 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_surface.c

index c6ff573..43f082e 100644 (file)
@@ -679,6 +679,12 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib,
                        if (level > 0)
                                continue;
 
+                       /* Check that we actually got a TC-compatible HTILE if
+                        * we requested it (only for level 0, since we're not
+                        * supporting HTILE on higher mip levels anyway). */
+                       assert(AddrSurfInfoOut.tcCompatible ||
+                              !AddrSurfInfoIn.flags.tcCompatible);
+
                        r = gfx6_surface_settings(addrlib, info, config,
                                                  &AddrSurfInfoOut, surf);
                        if (r)