@@ -383,10 +383,13 @@ class VKDevice : public offloadtest::Device {
383383#endif
384384
385385 Features.pNext = &Features11;
386- Features11.pNext = &Features12;
387- Features12.pNext = &Features13;
386+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 2 , 0 ))
387+ Features11.pNext = &Features12;
388+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 3 , 0 ))
389+ Features12.pNext = &Features13;
388390#ifdef VK_VERSION_1_4
389- Features13.pNext = &Features14;
391+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 4 , 0 ))
392+ Features13.pNext = &Features14;
390393#endif
391394 vkGetPhysicalDeviceFeatures2 (Device, &Features);
392395
@@ -509,10 +512,13 @@ class VKDevice : public offloadtest::Device {
509512#endif
510513
511514 Features.pNext = &Features11;
512- Features11.pNext = &Features12;
513- Features12.pNext = &Features13;
515+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 2 , 0 ))
516+ Features11.pNext = &Features12;
517+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 3 , 0 ))
518+ Features12.pNext = &Features13;
514519#ifdef VK_VERSION_1_4
515- Features13.pNext = &Features14;
520+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 4 , 0 ))
521+ Features13.pNext = &Features14;
516522#endif
517523 vkGetPhysicalDeviceFeatures2 (Device, &Features);
518524
0 commit comments