Skip to content

Commit

Permalink
[VK] Fix an image view creation
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed Apr 18, 2023
1 parent bf9dbd3 commit e8b9b97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/graphics/vulkan/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace {
if (auto image = load_image_2d(model_dir / *path,
VK_FORMAT_R8G8B8A8_SRGB,
VK_IMAGE_USAGE_SAMPLED_BIT)) {
ImageView view {*image, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT};
auto view =
create_image_view(*image, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT);
VkImageView result = view.get();

cache.views.try_emplace(image->get(), std::move(view));
Expand Down

0 comments on commit e8b9b97

Please sign in to comment.