Introduce helper function ResultValue<UniqueHandle<Type, Dispatch>>::asTuple()
Allows coding like this:
vk::Result result;
vk::UniquePipeline pipeline;
std::tie( result, pipeline ) =
device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo ).asTuple();
This commit is contained in:
@@ -161,9 +161,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
renderPass.get() // renderPass
|
||||
);
|
||||
|
||||
vk::ResultValue<vk::UniquePipeline> pipeline =
|
||||
device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo );
|
||||
switch ( pipeline.result )
|
||||
vk::Result result;
|
||||
vk::UniquePipeline pipeline;
|
||||
std::tie( result, pipeline ) =
|
||||
device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo ).asTuple();
|
||||
switch ( result )
|
||||
{
|
||||
case vk::Result::eSuccess: break;
|
||||
case vk::Result::ePipelineCompileRequiredEXT:
|
||||
|
||||
Reference in New Issue
Block a user