|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Core::VKImage > MayaFlux::Portal::Graphics::TextureLoom::create_2d_uninitialized | ( | uint32_t | width, |
| uint32_t | height, | ||
| ImageFormat | format = ImageFormat::RGBA8, |
||
| uint32_t | mip_levels = 1 |
||
| ) |
Allocate a 2D texture without uploading data or transitioning its layout - left VK_IMAGE_LAYOUT_UNDEFINED.
Every create_2d*() overload above performs (and blocks on) an initial layout transition or upload of its own, even when called with no data - create_2d(w, h, format, nullptr) still does a blocking transition to eShaderReadOnlyOptimal before returning. Use this instead when the caller is about to record its own upload right after (e.g. upload_data(image, data, size, staging, true) with deferred=true), so the whole undefined -> transfer-dst -> copy -> shader-read sequence is recorded once into a deferred command batch instead of paying for a separate blocking queue.waitIdle() first.
| width | Width in pixels. |
| height | Height in pixels. |
| format | Image format (default RGBA8). |
| mip_levels | Number of mipmap levels (1 = no mipmaps). |
Definition at line 141 of file TextureLoom.cpp.
References format, height, image, MayaFlux::Kakshya::IMAGE_COLOR, MayaFlux::Journal::ImageProcessing, MayaFlux::Core::BackendResourceManager::initialize_image(), is_initialized(), m_resource_manager, m_textures, MF_ERROR, MF_INFO, MayaFlux::Journal::Portal, MayaFlux::Core::VKImage::TEXTURE_2D, to_vulkan_format(), MayaFlux::Core::VKImage::TYPE_2D, and width.
Here is the call graph for this function: