Skip to content

Commit ee27f38

Browse files
committed
Pass Descriptor Indexing as a required Feature
1 parent 1eabf3e commit ee27f38

File tree

1 file changed

+21
-1
lines changed
  • examples_tests/60.ClusteredRendering

1 file changed

+21
-1
lines changed

examples_tests/60.ClusteredRendering/main.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,30 @@ class ClusteredRenderingSampleApp : public ApplicationBase
512512

513513
CommonAPI::InitOutput initOutput;
514514
initOutput.window = core::smart_refctd_ptr(window);
515-
CommonAPI::InitWithDefaultExt(
515+
516+
CommonAPI::SFeatureRequest<nbl::video::IAPIConnection::E_FEATURE> requiredInstanceFeatures = {};
517+
CommonAPI::SFeatureRequest<nbl::video::IAPIConnection::E_FEATURE> optionalInstanceFeatures = {};
518+
CommonAPI::SFeatureRequest<nbl::video::ILogicalDevice::E_FEATURE> requiredDeviceFeatures = {};
519+
CommonAPI::SFeatureRequest<nbl::video::ILogicalDevice::E_FEATURE> optionalDeviceFeatures = {};
520+
521+
#ifndef _NBL_PLATFORM_ANDROID_
522+
nbl::video::IAPIConnection::E_FEATURE requiredFeatures_Instance[] = { nbl::video::IAPIConnection::EF_SURFACE };
523+
requiredInstanceFeatures.features = requiredFeatures_Instance;
524+
requiredInstanceFeatures.count = 1u;
525+
526+
nbl::video::ILogicalDevice::E_FEATURE requiredFeatures_Device[] = { nbl::video::ILogicalDevice::EF_SWAPCHAIN, nbl::video::ILogicalDevice::EF_DESCRIPTOR_INDEXING };
527+
requiredDeviceFeatures.features = requiredFeatures_Device;
528+
requiredDeviceFeatures.count = 2u;
529+
#endif
530+
531+
CommonAPI::Init(
516532
initOutput,
517533
video::EAT_VULKAN,
518534
"ClusteredLighting",
535+
requiredInstanceFeatures,
536+
optionalInstanceFeatures,
537+
requiredDeviceFeatures,
538+
optionalDeviceFeatures,
519539
WIN_W, WIN_H, SC_IMG_COUNT,
520540
swapchainImageUsage,
521541
surfaceFormat);

0 commit comments

Comments
 (0)