summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2017-02-07 00:24:16 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-14 00:13:14 +0000
commitba725de721ca6a204a34c6ae1fbc2edae914467d (patch)
tree69dd424aed05c86577a402b22faf43bab76b02f5 /src
parenta085b5e0516ad1f27d4d350f9dc5cbc6e1973517 (diff)
radv: Pass CMASK alignment to application.
CMASK alignment can be greater than image data alignment, so pass it to the app so that it knows what alignment to backing memory should have. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit eb01b20cc41e9501062eb25034069e484f8b1899)
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 9649158eac6..bb666877bcc 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -575,6 +575,7 @@ radv_image_alloc_cmask(struct radv_device *device,
/* + 8 for storing the clear values */
image->clear_value_offset = image->cmask.offset + image->cmask.size;
image->size = image->cmask.offset + image->cmask.size + 8;
+ image->alignment = MAX2(image->alignment, image->cmask.alignment);
}
static void