From e2abe6dcab54cf71453fd922b7f9279d0c442eff Mon Sep 17 00:00:00 2001 From: Pablo Escobar <mail@rvrs.in> Date: Wed, 19 May 2021 02:39:08 +0200 Subject: [PATCH] determine image aspect mask from format --- liblava/resource/image.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/liblava/resource/image.cpp b/liblava/resource/image.cpp index 433a7338..36680b72 100644 --- a/liblava/resource/image.cpp +++ b/liblava/resource/image.cpp @@ -3,6 +3,7 @@ // license : MIT; see accompanying LICENSE file #include <liblava/resource/image.hpp> +#include <liblava/resource/format.hpp> namespace lava { @@ -27,7 +28,7 @@ namespace lava { }; subresource_range = { - .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + .aspectMask = format_aspect_mask(format), .baseMipLevel = 0, .levelCount = 1, .baseArrayLayer = 0, -- GitLab