MCPcopy Create free account
hub / github.com/InoriRus/Kyty / UtilSetImageLayoutOptimal

Function UtilSetImageLayoutOptimal

source/emulator/src/Graphics/Utils.cpp:407–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void 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
427void UtilFillImage(GraphicContext* ctx, VulkanImage* image, const void* src_data, uint64_t size, const Vector<BufferImageCopy>& regions,
428 uint64_t dst_layout)

Callers 1

CreateDummyBufferMethod · 0.85

Calls 8

set_image_layoutFunction · 0.85
WaitForFenceMethod · 0.80
IsInvalidMethod · 0.45
BeginMethod · 0.45
GetPoolMethod · 0.45
GetIndexMethod · 0.45
EndMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected