radeonsi: always calculate DCC info even if it's not used immediately
authorMarek Olšák <marek.olsak@amd.com>
Tue, 21 Jun 2016 14:09:33 +0000 (16:09 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Jun 2016 18:12:00 +0000 (20:12 +0200)
for a later use

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

index 81acd42a330c37add3834d455a446f4bf30ba47e..50f50257ebf317d7267e7371880e3b5a72a6a6c9 100644 (file)
@@ -1040,7 +1040,8 @@ r600_texture_create_object(struct pipe_screen *screen,
                 * apply_opaque_metadata later.
                 */
                if (rtex->surface.dcc_size &&
-                   (buf || !(rscreen->debug_flags & DBG_NO_DCC))) {
+                   (buf || !(rscreen->debug_flags & DBG_NO_DCC)) &&
+                   !(rtex->surface.flags & RADEON_SURF_SCANOUT)) {
                        /* Reserve space for the DCC buffer. */
                        rtex->dcc_offset = align64(rtex->size, rtex->surface.dcc_alignment);
                        rtex->size = rtex->dcc_offset + rtex->surface.dcc_size;
index a45bcb0f7767cb5daeab566580e7407314d973a2..081f0e1bcb6b397317848fb691fbf47fc92d018e 100644 (file)
@@ -365,7 +365,6 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
     *   driver team).
     */
    AddrSurfInfoIn.flags.dccCompatible = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER) &&
-                                        !(surf->flags & RADEON_SURF_SCANOUT) &&
                                         !(surf->flags & RADEON_SURF_DISABLE_DCC) &&
                                         !compressed && AddrDccIn.numSamples <= 1 &&
                                         ((surf->array_size == 1 && surf->npix_z == 1) ||