Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor avk::image_usage #65

Open
johannesugb opened this issue Jul 24, 2022 · 0 comments
Open

Refactor avk::image_usage #65

johannesugb opened this issue Jul 24, 2022 · 0 comments
Labels
Vulkan Vulkan-centric task

Comments

@johannesugb
Copy link
Member

The current avk::image_usage is somewhat inflexible and suboptimal design. Furthermore, it contains several flags which are no longer required due to image layout transitions now being explicitly handled by users (therefore, image_usage::read_only, image_usage::presentable, and image_usage::shared_presentable can be removed).

Better: Refactor the existing enum struct image_usage into the following format:

namespace image_usage
{
  struct image_usage_data
  {
      vk::ImageUsageFlags mImageUsageFlags;
      vk::ImageTiling mImageTiling;
      vk::ImageCreateFlags mImageCreateFlags;
  };
}

and let such a struct be created by users in a convenient manner in the style of avk::stage or avk::access, using operator| or operator+ to let the user conveniently put together such a configuration.

Furthermore (and this is probably the big part of work for this issue): Refactor all the places where enum struct image_usage is used currently accordingly!

Hint: See extern std::tuple<vk::ImageUsageFlags, vk::ImageTiling, vk::ImageCreateFlagBits> to_vk_image_properties(avk::image_usage aImageUsage) for further details!

@johannesugb johannesugb added Vulkan Vulkan-centric task C++ C++-centric task and removed C++ C++-centric task labels Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Vulkan Vulkan-centric task
Development

No branches or pull requests

1 participant