453 {
455
456 auto library = weak_library.lock();
457
458 if (!device_holder || !library) {
459 return nullptr;
460 }
461
463
465 MakeDescriptorSetLayout(
desc, device_holder, immutable_sampler);
466 if (!descs_layout.
ok()) {
467 return nullptr;
468 }
469
471 MakePipelineLayout(
desc, device_holder, descs_layout.
value().get());
472 if (!pipeline_layout.
ok()) {
473 return nullptr;
474 }
475
476 vk::UniqueRenderPass render_pass =
478 if (!render_pass) {
480 return nullptr;
481 }
482
484 MakePipeline(
desc, device_holder, pso_cache,
485 pipeline_layout.
value().get(), render_pass.get());
486 if (!pipeline.
ok()) {
487 return nullptr;
488 }
489
490 auto pipeline_vk = std::unique_ptr<PipelineVK>(new PipelineVK(
491 device_holder,
492 library,
494 std::move(pipeline.
value()),
495 std::move(render_pass),
496 std::move(pipeline_layout.
value()),
497 std::move(descs_layout.
value()),
498 std::move(immutable_sampler)
499 ));
500 if (!pipeline_vk->IsValid()) {
502 return nullptr;
503 }
504 return pipeline_vk;
505}
static PipelineLibraryVK & Cast(PipelineLibrary &base)
const std::shared_ptr< PipelineCacheVK > & GetPSOCache() const
static vk::UniqueRenderPass CreateCompatRenderPassForPipeline(const vk::Device &device, const PipelineDescriptor &desc)
#define TRACE_EVENT0(category_group, name)