| 1554 | void Image::SetLayout(VkImageLayout image_layout) { TransitionLayout(create_info_.initialLayout, image_layout); } |
| 1555 | |
| 1556 | void Image::TransitionLayout(VkImageLayout old_layout, VkImageLayout new_layout) { |
| 1557 | CommandPool pool(*device_, device_->graphics_queue_node_index_); |
| 1558 | CommandBuffer cmd_buf(*device_, pool); |
| 1559 | |
| 1560 | cmd_buf.Begin(VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT); |
| 1561 | cmd_buf.TransitionLayout(*this, old_layout, new_layout); |
| 1562 | cmd_buf.End(); |
| 1563 | |
| 1564 | auto graphics_queue = device_->QueuesWithGraphicsCapability()[0]; |
| 1565 | graphics_queue->SubmitAndWait(cmd_buf); |
| 1566 | } |
| 1567 | |
| 1568 | VkImageViewCreateInfo Image::BasicViewCreatInfo(VkImageAspectFlags aspect_mask) const { |
| 1569 | VkImageViewCreateInfo ci = vku::InitStructHelper(); |
no test coverage detected