r600g: fix for HTILE on R6xx
authorMarek Olšák <marek.olsak@amd.com>
Sun, 20 Apr 2014 13:17:23 +0000 (15:17 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 Apr 2014 23:33:12 +0000 (01:33 +0200)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 55caece541f17ae32c5d51b511f3d7e42833aee8..e30d933093da6bc06e616ca1a8c711d0b78d50ff 100644 (file)
@@ -542,6 +542,12 @@ static unsigned r600_texture_htile_alloc_size(struct r600_common_screen *rscreen
                return 0;
        }
 
+       /* HW bug on R6xx. */
+       if (rscreen->chip_class == R600 &&
+           (rtex->surface.level[0].npix_x > 7680 ||
+            rtex->surface.level[0].npix_y > 7680))
+               return 0;
+
        /* this alignment and htile size only apply to linear htile buffer */
        sw = align(sw, 16 << 3);
        sh = align(sh, npipes << 3);