@@ -330,10 +330,13 @@ class VKDevice : public offloadtest::Device {
330
330
#endif
331
331
332
332
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;
335
337
#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;
337
340
#endif
338
341
vkGetPhysicalDeviceFeatures2 (Device, &Features);
339
342
@@ -437,10 +440,13 @@ class VKDevice : public offloadtest::Device {
437
440
#endif
438
441
439
442
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;
442
447
#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;
444
450
#endif
445
451
vkGetPhysicalDeviceFeatures2 (Device, &Features);
446
452
0 commit comments