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

Function UtilSetDepthLayoutOptimal

source/emulator/src/Graphics/Utils.cpp:382–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382void UtilSetDepthLayoutOptimal(DepthStencilVulkanImage* image)
383{
384 CommandBuffer buffer(GraphicContext::QUEUE_UTIL);
385 // buffer.SetQueue(GraphicContext::QUEUE_UTIL);
386
387 EXIT_NOT_IMPLEMENTED(buffer.IsInvalid());
388
389 buffer.Begin();
390
391 auto* vk_buffer = buffer.GetPool()->buffers[buffer.GetIndex()];
392
393 VkImageAspectFlags aspect_mask = VK_IMAGE_ASPECT_DEPTH_BIT;
394
395 if (image->format == VK_FORMAT_D24_UNORM_S8_UINT || image->format == VK_FORMAT_D32_SFLOAT_S8_UINT)
396 {
397 aspect_mask |= VK_IMAGE_ASPECT_STENCIL_BIT;
398 }
399
400 set_image_layout(vk_buffer, image, 0, 1, aspect_mask, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
401
402 buffer.End();
403 buffer.Execute();
404 buffer.WaitForFence();
405}
406
407void UtilSetImageLayoutOptimal(VulkanImage* image)
408{

Callers 1

create_funcFunction · 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