Vk: add assertions to prevent information loss in Vulkan 1.1 fallbacks.
Usually the validation layers should be expected to catch this, but in
this case we omit the pNext structure chain before it has a chance to be
caught by the layer, so the assert is needed.
"Vk::CommandBuffer::beginRenderPass(): disallowing conversion of SubpassBeginInfo to VkSubpassContents with non-empty pNext to prevent information loss",);
"Vk::CommandBuffer::nextRenderPass(): disallowing omission of SubpassEndInfo with non-empty pNext to prevent information loss",);
CORRADE_ASSERT(!beginInfo.pNext,
"Vk::CommandBuffer::nextRenderPass(): disallowing conversion of SubpassBeginInfo to VkSubpassContents with non-empty pNext to prevent information loss",);
CORRADE_COMPARE(out.str(),"Vk::AttachmentDescription: disallowing conversion to VkAttachmentDescription with non-empty pNext to prevent information loss\n");
CORRADE_SKIP("CORRADE_NO_ASSERT defined, can't test assertions");
#endif
AttachmentReferencereference{0,ImageLayout{}};
reference->pNext=&reference;
std::ostringstreamout;
ErrorredirectError{&out};
reference.vkAttachmentReference();
CORRADE_COMPARE(out.str(),"Vk::AttachmentReference: disallowing conversion to VkAttachmentReference with non-empty pNext to prevent information loss\n");
CORRADE_SKIP("CORRADE_NO_ASSERT defined, can't test assertions");
#endif
SubpassDescriptiondescription;
description->pNext=&description;
std::ostringstreamout;
ErrorredirectError{&out};
description.vkSubpassDescription();
CORRADE_COMPARE(out.str(),"Vk::SubpassDescription: disallowing conversion to VkSubpassDescription with non-empty pNext to prevent information loss\n");
"Vk::CommandBuffer::beginRenderPass(): disallowing conversion of SubpassBeginInfo to VkSubpassContents with non-empty pNext to prevent information loss\n"
"Vk::CommandBuffer::nextRenderPass(): disallowing conversion of SubpassBeginInfo to VkSubpassContents with non-empty pNext to prevent information loss\n"
"Vk::CommandBuffer::nextRenderPass(): disallowing omission of SubpassEndInfo with non-empty pNext to prevent information loss\n"
"Vk::CommandBuffer::endRenderPass(): disallowing omission of SubpassEndInfo with non-empty pNext to prevent information loss\n");