radv: set fmask_surf_index on fmask surfaces.
authorDave Airlie <airlied@redhat.com>
Tue, 1 May 2018 02:32:02 +0000 (12:32 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 1 May 2018 20:01:42 +0000 (06:01 +1000)
This is needed for gfx9 and later for all fmask surface index.

(Mentioned by Marek on irc)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_image.c

index a6f3628c8f87d7d2f83877672202c5906fad67b5..bfe497caa30f8416cd7b65f8fe519460bf67b743 100644 (file)
@@ -742,8 +742,10 @@ radv_image_get_fmask_info(struct radv_device *device,
        info.samples = 1;
        fmask.flags = image->surface.flags | RADEON_SURF_FMASK;
 
-       if (!image->shareable)
+       if (!image->shareable) {
+               info.fmask_surf_index = &device->fmask_mrt_offset_counter;
                info.surf_index = &device->fmask_mrt_offset_counter;
+       }
 
        /* Force 2D tiling if it wasn't set. This may occur when creating
         * FMASK for MSAA resolve on R6xx. On R6xx, the single-sample