radeonsi: fix r600_texture::tc_compatible_htile
authorMarek Olšák <marek.olsak@amd.com>
Sun, 6 Nov 2016 21:27:56 +0000 (22:27 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 Nov 2016 17:34:55 +0000 (18:34 +0100)
htile_size is now always non-zero if HTILE is allocated.

It seems to have caused no issues.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 693330474a3e79a62dd49bc8127f1c993ab05e1c..97673ee22509787e88d02ab23bc6e911525c23ef 100644 (file)
@@ -1007,9 +1007,9 @@ r600_texture_create_object(struct pipe_screen *screen,
        rtex->surface = *surface;
        rtex->size = rtex->surface.surf_size;
 
-       rtex->tc_compatible_htile = rtex->surface.htile_size != 0;
-       assert(!!(rtex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE) ==
-              rtex->tc_compatible_htile);
+       rtex->tc_compatible_htile = rtex->surface.htile_size != 0 &&
+                                   (rtex->surface.flags &
+                                    RADEON_SURF_TC_COMPATIBLE_HTILE);
 
        /* TC-compatible HTILE only supports Z32_FLOAT. */
        if (rtex->tc_compatible_htile)