r600g: fix MSAA resolve on R6xx when the destination is 1D-tiled
authorMarek Olšák <marek.olsak@amd.com>
Sat, 19 Apr 2014 21:11:41 +0000 (23:11 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 Apr 2014 23:33:12 +0000 (01:33 +0200)
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index c410543b81ba0a28fd6aaf261ad8a292b8ee3b85..55caece541f17ae32c5d51b511f3d7e42833aee8 100644 (file)
@@ -289,6 +289,12 @@ void r600_texture_get_fmask_info(struct r600_common_screen *rscreen,
        fmask.nsamples = 1;
        fmask.flags |= RADEON_SURF_FMASK;
 
+       /* Force 2D tiling if it wasn't set. This may occur when creating
+        * FMASK for MSAA resolve on R6xx. On R6xx, the single-sample
+        * destination buffer must have an FMASK too. */
+       fmask.flags = RADEON_SURF_CLR(fmask.flags, MODE);
+       fmask.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE);
+
        if (rscreen->chip_class >= SI) {
                fmask.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;
        }