You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently to transition image layouts has to be done manually through vk::sample_image::memory_barrier.
It would be convenient to have utility functions to perform these specific operations. These are utility because if users want to either transition image layouts they can OR they can define their own utility functions that does the transition image layouts.
As this is not the responsibility of the vk::sample_image to perform this operation.
Defining the utility function
As for the implementation, this is how I would see it be done for implementing the transition imgae layout.
Note
Prototype implementation. Does work. Most likely to change.
Currently to transition image layouts has to be done manually through
vk::sample_image::memory_barrier.It would be convenient to have utility functions to perform these specific operations. These are utility because if users want to either transition image layouts they can OR they can define their own utility functions that does the transition image layouts.
As this is not the responsibility of the
vk::sample_imageto perform this operation.Defining the utility function
As for the implementation, this is how I would see it be done for implementing the transition imgae layout.
Note
Prototype implementation. Does work. Most likely to change.
API Usage
transition_image_layout(logical_device, m_viewport_image, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);