aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-02-07 00:24:16 +0100
committerEmil Velikov <[email protected]>2017-02-10 11:06:59 +0000
commit27b6f7413cf64cec0c2a2a8af5a1dc487019de51 (patch)
tree2371596d5a3b48917c6117cc503e2f31e81c7ebc /src
parent1e868de4500a46abde745a517ead42afd3a904ca (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 <[email protected]> Cc: <[email protected]> Reviewed-by: Dave Airlie <[email protected]> (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 f75f0088495..31b44b0ccd6 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -571,6 +571,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