diff --git a/examples/inlineuniformblocks/inlineuniformblocks.cpp b/examples/inlineuniformblocks/inlineuniformblocks.cpp index 5b1725c0..1dafe711 100644 --- a/examples/inlineuniformblocks/inlineuniformblocks.cpp +++ b/examples/inlineuniformblocks/inlineuniformblocks.cpp @@ -5,7 +5,7 @@ * * Relevant code parts are marked with [POI] * -* Copyright (C) 2018 by Sascha Willems - www.saschawillems.de +* Copyright (C) 2018-2021 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ @@ -22,6 +22,8 @@ float rnd() { class VulkanExample : public VulkanExampleBase { public: + VkPhysicalDeviceInlineUniformBlockFeaturesEXT enabledInlineUniformBlockFeatures{}; + vkglTF::Model model; struct Object { @@ -326,6 +328,14 @@ public: VulkanExampleBase::submitFrame(); } + void getEnabledFeatures() + { + // Enable the inline uniform block feature using the dedicated physical device structure + enabledInlineUniformBlockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT; + enabledInlineUniformBlockFeatures.inlineUniformBlock = VK_TRUE; + deviceCreatepNextChain = &enabledInlineUniformBlockFeatures; + } + void prepare() { VulkanExampleBase::prepare();