@@ -330,10 +330,13 @@ class VKDevice : public offloadtest::Device {
330330#endif
331331
332332 Features.pNext = &Features11;
333- Features11.pNext = &Features12;
334- Features12.pNext = &Features13;
333+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 2 , 0 ))
334+ Features11.pNext = &Features12;
335+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 3 , 0 ))
336+ Features12.pNext = &Features13;
335337#ifdef VK_VERSION_1_4
336- Features13.pNext = &Features14;
338+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 4 , 0 ))
339+ Features13.pNext = &Features14;
337340#endif
338341 vkGetPhysicalDeviceFeatures2 (Device, &Features);
339342
@@ -437,10 +440,13 @@ class VKDevice : public offloadtest::Device {
437440#endif
438441
439442 Features.pNext = &Features11;
440- Features11.pNext = &Features12;
441- Features12.pNext = &Features13;
443+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 2 , 0 ))
444+ Features11.pNext = &Features12;
445+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 3 , 0 ))
446+ Features12.pNext = &Features13;
442447#ifdef VK_VERSION_1_4
443- Features13.pNext = &Features14;
448+ if (Props.apiVersion >= VK_MAKE_API_VERSION (0 , 1 , 4 , 0 ))
449+ Features13.pNext = &Features14;
444450#endif
445451 vkGetPhysicalDeviceFeatures2 (Device, &Features);
446452
0 commit comments