| 405 | } |
| 406 | |
| 407 | void UtilSetImageLayoutOptimal(VulkanImage* image) |
| 408 | { |
| 409 | CommandBuffer buffer(GraphicContext::QUEUE_UTIL); |
| 410 | // buffer.SetQueue(GraphicContext::QUEUE_UTIL); |
| 411 | |
| 412 | EXIT_NOT_IMPLEMENTED(buffer.IsInvalid()); |
| 413 | |
| 414 | buffer.Begin(); |
| 415 | |
| 416 | auto* vk_buffer = buffer.GetPool()->buffers[buffer.GetIndex()]; |
| 417 | |
| 418 | VkImageAspectFlags aspect_mask = VK_IMAGE_ASPECT_COLOR_BIT; |
| 419 | |
| 420 | set_image_layout(vk_buffer, image, 0, 1, aspect_mask, image->layout, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL); |
| 421 | |
| 422 | buffer.End(); |
| 423 | buffer.Execute(); |
| 424 | buffer.WaitForFence(); |
| 425 | } |
| 426 | |
| 427 | void UtilFillImage(GraphicContext* ctx, VulkanImage* image, const void* src_data, uint64_t size, const Vector<BufferImageCopy>& regions, |
| 428 | uint64_t dst_layout) |
no test coverage detected