MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / createImageView

Method createImageView

source/RenderGraph/ResourceHandler.cpp:349–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347 }
348
349 ResourceHandler::CreatedViewT< VkImageView > ResourceHandler::createImageView( GraphContext & context
350 , ImageViewId view )
351 {
352 ResourceHandler::CreatedViewT< VkImageView > result{};
353
354 if ( context.vkCreateImageView )
355 {
356 lock_type lock( m_bufferViewsMutex );
357 auto [it, ins] = m_imageViews.try_emplace( view, VkImageView{} );
358
359 if ( ins )
360 {
361 auto image = createImage( context, view.data->image ).resource;
362 auto createInfo = reshdl::convert( *view.data, image );
363 auto res = context.vkCreateImageView( context.device
364 , &createInfo
365 , context.allocator
366 , &it->second );
367 checkVkResult( res, "ImageView creation" );
368 crgRegisterObjectName( context, view.data->name, it->second );
369 result.view = it->second;
370 result.created = true;
371 }
372 else
373 {
374 result.view = it->second;
375 }
376 }
377
378 return result;
379 }
380
381 VkSampler ResourceHandler::createSampler( GraphContext & context
382 , std::string const & suffix

Callers

nothing calls this directly

Calls 3

createImageFunction · 0.85
checkVkResultFunction · 0.85
convertFunction · 0.70

Tested by

no test coverage detected