aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-08-07 23:34:00 +0200
committerBas Nieuwenhuizen <[email protected]>2017-08-07 23:44:59 +0200
commita6a6146aa91154fd31fb218bc60345bdda0d4f5d (patch)
treea1a597e24b508e9b432da36d1075d4199caf5d9b /src/amd
parenta2703fc119e8e806c6a8f47d665709d9e84aaa6a (diff)
radv: Don't allow fmask swizzling for shareable images.
Also adds an assert because you never know how the winsys changes, and multiprocess format differences are annoying. Fixes: 1e696b962b7 "radv: add separate fmask tile swizzle counter." Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_image.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 1ccd4a463f0..7e59142bf30 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -616,7 +616,8 @@ radv_image_get_fmask_info(struct radv_device *device,
info.samples = 1;
fmask.flags = image->surface.flags | RADEON_SURF_FMASK;
- info.surf_index = &device->fmask_mrt_offset_counter;
+ if (!image->shareable);
+ 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
@@ -649,6 +650,8 @@ radv_image_get_fmask_info(struct radv_device *device,
out->tile_swizzle = fmask.tile_swizzle;
out->alignment = MAX2(256, fmask.surf_alignment);
out->size = fmask.surf_size;
+
+ assert(!out->tile_swizzle || !image->shareable);
}
static void