aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-05-15 09:43:25 +1000
committerDave Airlie <[email protected]>2017-06-05 10:44:24 +1000
commit607e61c40e42ec548edd6b65fa480f8fa8472412 (patch)
tree87250a3c2d6ea30b88b84dc8b2f882deab211f80 /src/amd/vulkan/radv_image.c
parent8354f287db9fb1038ff2b889a9c46176527004a9 (diff)
radv: prepare fmask surface creation
The old code copied over all the surface info from the image surface, we only want some bits of it, and to modify the flags. This prevents a regression in dEQP-VK.api.copy_and_blit.resolve_image.* and others in the subsequent switch to ac_compute_surface. v2: - also disable opt4Space in radv_amdgpu_surface, so that we can apply this patch separately *before* switching to ac_compute_surface and hopefully avoid intermittent regressions (Nicolai) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r--src/amd/vulkan/radv_image.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 63cbc6bf924..2065545f20d 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -459,22 +459,21 @@ radv_image_get_fmask_info(struct radv_device *device,
struct radv_fmask_info *out)
{
/* FMASK is allocated like an ordinary texture. */
- struct radeon_surf fmask = image->surface;
+ struct radeon_surf fmask = {};
struct ac_surf_info info = image->info;
memset(out, 0, sizeof(*out));
- fmask.surf_alignment = 0;
- fmask.surf_size = 0;
- fmask.flags |= RADEON_SURF_FMASK;
+ fmask.blk_w = image->surface.blk_w;
+ fmask.blk_h = image->surface.blk_h;
info.samples = 1;
+ fmask.flags = image->surface.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);
- fmask.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX;
-
switch (nr_samples) {
case 2:
case 4: