Enable inline uniform block feature

Fixes #875
This commit is contained in:
Sascha Willems 2021-09-04 09:28:16 +02:00
parent 4ae88a2772
commit eb11297312

View file

@ -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();