Skip to content

Refactor avk::image_usage #65

Open
@johannesugb

Description

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!

Metadata

Assignees

No one assigned

    Labels

    VulkanVulkan-centric task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions