1 /* WARNING: This is auto-generated file. Do not modify, since changes will
2 * be lost! Modify the generating script instead.
3 * This file was generated by /scripts/gen_framework.py
8 tcu::TestStatus createDeviceWithUnsupportedFeaturesTest16BitStorageFeatures (Context& context)
10 const PlatformInterface& vkp = context.getPlatformInterface();
11 tcu::TestLog& log = context.getTestContext().getLog();
12 tcu::ResultCollector resultCollector (log);
13 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
14 const InstanceDriver& instanceDriver (instance.getDriver());
15 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
16 const deUint32 queueFamilyIndex = 0;
17 const deUint32 queueCount = 1;
18 const float queuePriority = 1.0f;
19 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
20 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
22 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
23 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
25 VkPhysicalDeviceFeatures emptyDeviceFeatures;
26 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
28 // Only non-core extensions will be used when creating the device.
29 vector<const char*> coreExtensions;
30 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
31 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
33 vector<const char*> extensionNames;
34 extensionNames.reserve(nonCoreExtensions.size());
35 for (const string& extension : nonCoreExtensions)
36 extensionNames.push_back(extension.c_str());
38 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDevice16BitStorageFeatures>()))
40 static const Feature features[] =
42 FEATURE_ITEM (VkPhysicalDevice16BitStorageFeatures, storageBuffer16BitAccess),
43 FEATURE_ITEM (VkPhysicalDevice16BitStorageFeatures, uniformAndStorageBuffer16BitAccess),
44 FEATURE_ITEM (VkPhysicalDevice16BitStorageFeatures, storagePushConstant16),
45 FEATURE_ITEM (VkPhysicalDevice16BitStorageFeatures, storageInputOutput16),
47 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(featuresStruct);
48 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 4, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
52 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
54 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
58 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestMultiviewFeatures (Context& context)
60 const PlatformInterface& vkp = context.getPlatformInterface();
61 tcu::TestLog& log = context.getTestContext().getLog();
62 tcu::ResultCollector resultCollector (log);
63 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
64 const InstanceDriver& instanceDriver (instance.getDriver());
65 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
66 const deUint32 queueFamilyIndex = 0;
67 const deUint32 queueCount = 1;
68 const float queuePriority = 1.0f;
69 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
70 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
72 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
73 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
75 VkPhysicalDeviceFeatures emptyDeviceFeatures;
76 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
78 // Only non-core extensions will be used when creating the device.
79 vector<const char*> coreExtensions;
80 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
81 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
83 vector<const char*> extensionNames;
84 extensionNames.reserve(nonCoreExtensions.size());
85 for (const string& extension : nonCoreExtensions)
86 extensionNames.push_back(extension.c_str());
88 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceMultiviewFeatures>()))
90 static const Feature features[] =
92 FEATURE_ITEM (VkPhysicalDeviceMultiviewFeatures, multiview),
93 FEATURE_ITEM (VkPhysicalDeviceMultiviewFeatures, multiviewGeometryShader),
94 FEATURE_ITEM (VkPhysicalDeviceMultiviewFeatures, multiviewTessellationShader),
96 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(featuresStruct);
97 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
101 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
103 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
107 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVariablePointersFeatures (Context& context)
109 const PlatformInterface& vkp = context.getPlatformInterface();
110 tcu::TestLog& log = context.getTestContext().getLog();
111 tcu::ResultCollector resultCollector (log);
112 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
113 const InstanceDriver& instanceDriver (instance.getDriver());
114 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
115 const deUint32 queueFamilyIndex = 0;
116 const deUint32 queueCount = 1;
117 const float queuePriority = 1.0f;
118 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
119 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
121 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
122 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
124 VkPhysicalDeviceFeatures emptyDeviceFeatures;
125 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
127 // Only non-core extensions will be used when creating the device.
128 vector<const char*> coreExtensions;
129 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
130 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
132 vector<const char*> extensionNames;
133 extensionNames.reserve(nonCoreExtensions.size());
134 for (const string& extension : nonCoreExtensions)
135 extensionNames.push_back(extension.c_str());
137 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVariablePointersFeatures>()))
139 static const Feature features[] =
141 FEATURE_ITEM (VkPhysicalDeviceVariablePointersFeatures, variablePointersStorageBuffer),
142 FEATURE_ITEM (VkPhysicalDeviceVariablePointersFeatures, variablePointers),
144 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVariablePointersFeatures*>(featuresStruct);
145 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
149 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
151 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
155 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestProtectedMemoryFeatures (Context& context)
157 const PlatformInterface& vkp = context.getPlatformInterface();
158 tcu::TestLog& log = context.getTestContext().getLog();
159 tcu::ResultCollector resultCollector (log);
160 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
161 const InstanceDriver& instanceDriver (instance.getDriver());
162 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
163 const deUint32 queueFamilyIndex = 0;
164 const deUint32 queueCount = 1;
165 const float queuePriority = 1.0f;
166 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
167 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
169 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
170 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
172 VkPhysicalDeviceFeatures emptyDeviceFeatures;
173 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
175 // Only non-core extensions will be used when creating the device.
176 vector<const char*> coreExtensions;
177 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
178 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
180 vector<const char*> extensionNames;
181 extensionNames.reserve(nonCoreExtensions.size());
182 for (const string& extension : nonCoreExtensions)
183 extensionNames.push_back(extension.c_str());
185 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceProtectedMemoryFeatures>()))
187 static const Feature features[] =
189 FEATURE_ITEM (VkPhysicalDeviceProtectedMemoryFeatures, protectedMemory),
191 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(featuresStruct);
192 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
196 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
198 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
202 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestSamplerYcbcrConversionFeatures (Context& context)
204 const PlatformInterface& vkp = context.getPlatformInterface();
205 tcu::TestLog& log = context.getTestContext().getLog();
206 tcu::ResultCollector resultCollector (log);
207 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
208 const InstanceDriver& instanceDriver (instance.getDriver());
209 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
210 const deUint32 queueFamilyIndex = 0;
211 const deUint32 queueCount = 1;
212 const float queuePriority = 1.0f;
213 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
214 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
216 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
217 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
219 VkPhysicalDeviceFeatures emptyDeviceFeatures;
220 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
222 // Only non-core extensions will be used when creating the device.
223 vector<const char*> coreExtensions;
224 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
225 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
227 vector<const char*> extensionNames;
228 extensionNames.reserve(nonCoreExtensions.size());
229 for (const string& extension : nonCoreExtensions)
230 extensionNames.push_back(extension.c_str());
232 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceSamplerYcbcrConversionFeatures>()))
234 static const Feature features[] =
236 FEATURE_ITEM (VkPhysicalDeviceSamplerYcbcrConversionFeatures, samplerYcbcrConversion),
238 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(featuresStruct);
239 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
243 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
245 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
249 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderDrawParametersFeatures (Context& context)
251 const PlatformInterface& vkp = context.getPlatformInterface();
252 tcu::TestLog& log = context.getTestContext().getLog();
253 tcu::ResultCollector resultCollector (log);
254 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
255 const InstanceDriver& instanceDriver (instance.getDriver());
256 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
257 const deUint32 queueFamilyIndex = 0;
258 const deUint32 queueCount = 1;
259 const float queuePriority = 1.0f;
260 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
261 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
263 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
264 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
266 VkPhysicalDeviceFeatures emptyDeviceFeatures;
267 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
269 // Only non-core extensions will be used when creating the device.
270 vector<const char*> coreExtensions;
271 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
272 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
274 vector<const char*> extensionNames;
275 extensionNames.reserve(nonCoreExtensions.size());
276 for (const string& extension : nonCoreExtensions)
277 extensionNames.push_back(extension.c_str());
279 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderDrawParametersFeatures>()))
281 static const Feature features[] =
283 FEATURE_ITEM (VkPhysicalDeviceShaderDrawParametersFeatures, shaderDrawParameters),
285 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderDrawParametersFeatures*>(featuresStruct);
286 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
290 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
292 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
296 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVulkan11Features (Context& context)
298 const PlatformInterface& vkp = context.getPlatformInterface();
299 tcu::TestLog& log = context.getTestContext().getLog();
300 tcu::ResultCollector resultCollector (log);
301 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
302 const InstanceDriver& instanceDriver (instance.getDriver());
303 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
304 const deUint32 queueFamilyIndex = 0;
305 const deUint32 queueCount = 1;
306 const float queuePriority = 1.0f;
307 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
308 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
310 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
311 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
313 VkPhysicalDeviceFeatures emptyDeviceFeatures;
314 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
316 // Only non-core extensions will be used when creating the device.
317 vector<const char*> coreExtensions;
318 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
319 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
321 vector<const char*> extensionNames;
322 extensionNames.reserve(nonCoreExtensions.size());
323 for (const string& extension : nonCoreExtensions)
324 extensionNames.push_back(extension.c_str());
326 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVulkan11Features>()))
328 static const Feature features[] =
330 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, storageBuffer16BitAccess),
331 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, uniformAndStorageBuffer16BitAccess),
332 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, storagePushConstant16),
333 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, storageInputOutput16),
334 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, multiview),
335 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, multiviewGeometryShader),
336 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, multiviewTessellationShader),
337 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, variablePointersStorageBuffer),
338 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, variablePointers),
339 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, protectedMemory),
340 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, samplerYcbcrConversion),
341 FEATURE_ITEM (VkPhysicalDeviceVulkan11Features, shaderDrawParameters),
343 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVulkan11Features*>(featuresStruct);
344 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 12, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, DE_NULL, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
348 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
350 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
354 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVulkan12Features (Context& context)
356 const PlatformInterface& vkp = context.getPlatformInterface();
357 tcu::TestLog& log = context.getTestContext().getLog();
358 tcu::ResultCollector resultCollector (log);
359 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
360 const InstanceDriver& instanceDriver (instance.getDriver());
361 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
362 const deUint32 queueFamilyIndex = 0;
363 const deUint32 queueCount = 1;
364 const float queuePriority = 1.0f;
365 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
366 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
368 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
369 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
371 VkPhysicalDeviceFeatures emptyDeviceFeatures;
372 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
374 // Only non-core extensions will be used when creating the device.
375 vector<const char*> coreExtensions;
376 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
377 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
379 vector<const char*> extensionNames;
380 extensionNames.reserve(nonCoreExtensions.size());
381 for (const string& extension : nonCoreExtensions)
382 extensionNames.push_back(extension.c_str());
384 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVulkan12Features>()))
386 static const Feature features[] =
388 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, samplerMirrorClampToEdge),
389 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, drawIndirectCount),
390 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, storageBuffer8BitAccess),
391 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, uniformAndStorageBuffer8BitAccess),
392 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, storagePushConstant8),
393 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderBufferInt64Atomics),
394 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderSharedInt64Atomics),
395 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderFloat16),
396 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderInt8),
397 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorIndexing),
398 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderInputAttachmentArrayDynamicIndexing),
399 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderUniformTexelBufferArrayDynamicIndexing),
400 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderStorageTexelBufferArrayDynamicIndexing),
401 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderUniformBufferArrayNonUniformIndexing),
402 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderSampledImageArrayNonUniformIndexing),
403 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderStorageBufferArrayNonUniformIndexing),
404 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderStorageImageArrayNonUniformIndexing),
405 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderInputAttachmentArrayNonUniformIndexing),
406 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderUniformTexelBufferArrayNonUniformIndexing),
407 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderStorageTexelBufferArrayNonUniformIndexing),
408 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingUniformBufferUpdateAfterBind),
409 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingSampledImageUpdateAfterBind),
410 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingStorageImageUpdateAfterBind),
411 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingStorageBufferUpdateAfterBind),
412 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingUniformTexelBufferUpdateAfterBind),
413 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingStorageTexelBufferUpdateAfterBind),
414 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingUpdateUnusedWhilePending),
415 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingPartiallyBound),
416 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, descriptorBindingVariableDescriptorCount),
417 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, runtimeDescriptorArray),
418 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, samplerFilterMinmax),
419 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, scalarBlockLayout),
420 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, imagelessFramebuffer),
421 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, uniformBufferStandardLayout),
422 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderSubgroupExtendedTypes),
423 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, separateDepthStencilLayouts),
424 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, hostQueryReset),
425 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, timelineSemaphore),
426 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, bufferDeviceAddress),
427 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, bufferDeviceAddressCaptureReplay),
428 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, bufferDeviceAddressMultiDevice),
429 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, vulkanMemoryModel),
430 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, vulkanMemoryModelDeviceScope),
431 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, vulkanMemoryModelAvailabilityVisibilityChains),
432 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderOutputViewportIndex),
433 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, shaderOutputLayer),
434 FEATURE_ITEM (VkPhysicalDeviceVulkan12Features, subgroupBroadcastDynamicId),
436 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVulkan12Features*>(featuresStruct);
437 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 47, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, DE_NULL, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
441 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
443 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
447 tcu::TestStatus createDeviceWithUnsupportedFeaturesTest8BitStorageFeatures (Context& context)
449 const PlatformInterface& vkp = context.getPlatformInterface();
450 tcu::TestLog& log = context.getTestContext().getLog();
451 tcu::ResultCollector resultCollector (log);
452 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
453 const InstanceDriver& instanceDriver (instance.getDriver());
454 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
455 const deUint32 queueFamilyIndex = 0;
456 const deUint32 queueCount = 1;
457 const float queuePriority = 1.0f;
458 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
459 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
461 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
462 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
464 VkPhysicalDeviceFeatures emptyDeviceFeatures;
465 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
467 // Only non-core extensions will be used when creating the device.
468 vector<const char*> coreExtensions;
469 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
470 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
472 vector<const char*> extensionNames;
473 extensionNames.reserve(nonCoreExtensions.size());
474 for (const string& extension : nonCoreExtensions)
475 extensionNames.push_back(extension.c_str());
477 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDevice8BitStorageFeatures>()))
479 static const Feature features[] =
481 FEATURE_ITEM (VkPhysicalDevice8BitStorageFeatures, storageBuffer8BitAccess),
482 FEATURE_ITEM (VkPhysicalDevice8BitStorageFeatures, uniformAndStorageBuffer8BitAccess),
483 FEATURE_ITEM (VkPhysicalDevice8BitStorageFeatures, storagePushConstant8),
485 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDevice8BitStorageFeatures*>(featuresStruct);
486 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
490 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
492 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
496 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderAtomicInt64Features (Context& context)
498 const PlatformInterface& vkp = context.getPlatformInterface();
499 tcu::TestLog& log = context.getTestContext().getLog();
500 tcu::ResultCollector resultCollector (log);
501 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
502 const InstanceDriver& instanceDriver (instance.getDriver());
503 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
504 const deUint32 queueFamilyIndex = 0;
505 const deUint32 queueCount = 1;
506 const float queuePriority = 1.0f;
507 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
508 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
510 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
511 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
513 VkPhysicalDeviceFeatures emptyDeviceFeatures;
514 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
516 // Only non-core extensions will be used when creating the device.
517 vector<const char*> coreExtensions;
518 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
519 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
521 vector<const char*> extensionNames;
522 extensionNames.reserve(nonCoreExtensions.size());
523 for (const string& extension : nonCoreExtensions)
524 extensionNames.push_back(extension.c_str());
526 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderAtomicInt64Features>()))
528 static const Feature features[] =
530 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicInt64Features, shaderBufferInt64Atomics),
531 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicInt64Features, shaderSharedInt64Atomics),
533 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderAtomicInt64Features*>(featuresStruct);
534 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
538 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
540 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
544 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderFloat16Int8Features (Context& context)
546 const PlatformInterface& vkp = context.getPlatformInterface();
547 tcu::TestLog& log = context.getTestContext().getLog();
548 tcu::ResultCollector resultCollector (log);
549 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
550 const InstanceDriver& instanceDriver (instance.getDriver());
551 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
552 const deUint32 queueFamilyIndex = 0;
553 const deUint32 queueCount = 1;
554 const float queuePriority = 1.0f;
555 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
556 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
558 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
559 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
561 VkPhysicalDeviceFeatures emptyDeviceFeatures;
562 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
564 // Only non-core extensions will be used when creating the device.
565 vector<const char*> coreExtensions;
566 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
567 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
569 vector<const char*> extensionNames;
570 extensionNames.reserve(nonCoreExtensions.size());
571 for (const string& extension : nonCoreExtensions)
572 extensionNames.push_back(extension.c_str());
574 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderFloat16Int8Features>()))
576 static const Feature features[] =
578 FEATURE_ITEM (VkPhysicalDeviceShaderFloat16Int8Features, shaderFloat16),
579 FEATURE_ITEM (VkPhysicalDeviceShaderFloat16Int8Features, shaderInt8),
581 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8Features*>(featuresStruct);
582 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
586 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
588 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
592 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestDescriptorIndexingFeatures (Context& context)
594 const PlatformInterface& vkp = context.getPlatformInterface();
595 tcu::TestLog& log = context.getTestContext().getLog();
596 tcu::ResultCollector resultCollector (log);
597 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
598 const InstanceDriver& instanceDriver (instance.getDriver());
599 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
600 const deUint32 queueFamilyIndex = 0;
601 const deUint32 queueCount = 1;
602 const float queuePriority = 1.0f;
603 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
604 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
606 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
607 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
609 VkPhysicalDeviceFeatures emptyDeviceFeatures;
610 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
612 // Only non-core extensions will be used when creating the device.
613 vector<const char*> coreExtensions;
614 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
615 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
617 vector<const char*> extensionNames;
618 extensionNames.reserve(nonCoreExtensions.size());
619 for (const string& extension : nonCoreExtensions)
620 extensionNames.push_back(extension.c_str());
622 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceDescriptorIndexingFeatures>()))
624 static const Feature features[] =
626 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderInputAttachmentArrayDynamicIndexing),
627 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderUniformTexelBufferArrayDynamicIndexing),
628 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderStorageTexelBufferArrayDynamicIndexing),
629 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderUniformBufferArrayNonUniformIndexing),
630 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderSampledImageArrayNonUniformIndexing),
631 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderStorageBufferArrayNonUniformIndexing),
632 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderStorageImageArrayNonUniformIndexing),
633 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderInputAttachmentArrayNonUniformIndexing),
634 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderUniformTexelBufferArrayNonUniformIndexing),
635 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, shaderStorageTexelBufferArrayNonUniformIndexing),
636 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingUniformBufferUpdateAfterBind),
637 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingSampledImageUpdateAfterBind),
638 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingStorageImageUpdateAfterBind),
639 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingStorageBufferUpdateAfterBind),
640 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingUniformTexelBufferUpdateAfterBind),
641 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingStorageTexelBufferUpdateAfterBind),
642 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingUpdateUnusedWhilePending),
643 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingPartiallyBound),
644 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, descriptorBindingVariableDescriptorCount),
645 FEATURE_ITEM (VkPhysicalDeviceDescriptorIndexingFeatures, runtimeDescriptorArray),
647 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeatures*>(featuresStruct);
648 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 20, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
652 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
654 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
658 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestScalarBlockLayoutFeatures (Context& context)
660 const PlatformInterface& vkp = context.getPlatformInterface();
661 tcu::TestLog& log = context.getTestContext().getLog();
662 tcu::ResultCollector resultCollector (log);
663 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
664 const InstanceDriver& instanceDriver (instance.getDriver());
665 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
666 const deUint32 queueFamilyIndex = 0;
667 const deUint32 queueCount = 1;
668 const float queuePriority = 1.0f;
669 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
670 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
672 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
673 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
675 VkPhysicalDeviceFeatures emptyDeviceFeatures;
676 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
678 // Only non-core extensions will be used when creating the device.
679 vector<const char*> coreExtensions;
680 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
681 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
683 vector<const char*> extensionNames;
684 extensionNames.reserve(nonCoreExtensions.size());
685 for (const string& extension : nonCoreExtensions)
686 extensionNames.push_back(extension.c_str());
688 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceScalarBlockLayoutFeatures>()))
690 static const Feature features[] =
692 FEATURE_ITEM (VkPhysicalDeviceScalarBlockLayoutFeatures, scalarBlockLayout),
694 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceScalarBlockLayoutFeatures*>(featuresStruct);
695 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
699 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
701 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
705 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVulkanMemoryModelFeatures (Context& context)
707 const PlatformInterface& vkp = context.getPlatformInterface();
708 tcu::TestLog& log = context.getTestContext().getLog();
709 tcu::ResultCollector resultCollector (log);
710 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
711 const InstanceDriver& instanceDriver (instance.getDriver());
712 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
713 const deUint32 queueFamilyIndex = 0;
714 const deUint32 queueCount = 1;
715 const float queuePriority = 1.0f;
716 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
717 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
719 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
720 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
722 VkPhysicalDeviceFeatures emptyDeviceFeatures;
723 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
725 // Only non-core extensions will be used when creating the device.
726 vector<const char*> coreExtensions;
727 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
728 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
730 vector<const char*> extensionNames;
731 extensionNames.reserve(nonCoreExtensions.size());
732 for (const string& extension : nonCoreExtensions)
733 extensionNames.push_back(extension.c_str());
735 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVulkanMemoryModelFeatures>()))
737 static const Feature features[] =
739 FEATURE_ITEM (VkPhysicalDeviceVulkanMemoryModelFeatures, vulkanMemoryModel),
740 FEATURE_ITEM (VkPhysicalDeviceVulkanMemoryModelFeatures, vulkanMemoryModelDeviceScope),
741 FEATURE_ITEM (VkPhysicalDeviceVulkanMemoryModelFeatures, vulkanMemoryModelAvailabilityVisibilityChains),
743 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVulkanMemoryModelFeatures*>(featuresStruct);
744 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
748 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
750 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
754 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestImagelessFramebufferFeatures (Context& context)
756 const PlatformInterface& vkp = context.getPlatformInterface();
757 tcu::TestLog& log = context.getTestContext().getLog();
758 tcu::ResultCollector resultCollector (log);
759 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
760 const InstanceDriver& instanceDriver (instance.getDriver());
761 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
762 const deUint32 queueFamilyIndex = 0;
763 const deUint32 queueCount = 1;
764 const float queuePriority = 1.0f;
765 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
766 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
768 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
769 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
771 VkPhysicalDeviceFeatures emptyDeviceFeatures;
772 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
774 // Only non-core extensions will be used when creating the device.
775 vector<const char*> coreExtensions;
776 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
777 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
779 vector<const char*> extensionNames;
780 extensionNames.reserve(nonCoreExtensions.size());
781 for (const string& extension : nonCoreExtensions)
782 extensionNames.push_back(extension.c_str());
784 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceImagelessFramebufferFeatures>()))
786 static const Feature features[] =
788 FEATURE_ITEM (VkPhysicalDeviceImagelessFramebufferFeatures, imagelessFramebuffer),
790 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceImagelessFramebufferFeatures*>(featuresStruct);
791 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
795 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
797 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
801 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestUniformBufferStandardLayoutFeatures (Context& context)
803 const PlatformInterface& vkp = context.getPlatformInterface();
804 tcu::TestLog& log = context.getTestContext().getLog();
805 tcu::ResultCollector resultCollector (log);
806 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
807 const InstanceDriver& instanceDriver (instance.getDriver());
808 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
809 const deUint32 queueFamilyIndex = 0;
810 const deUint32 queueCount = 1;
811 const float queuePriority = 1.0f;
812 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
813 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
815 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
816 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
818 VkPhysicalDeviceFeatures emptyDeviceFeatures;
819 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
821 // Only non-core extensions will be used when creating the device.
822 vector<const char*> coreExtensions;
823 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
824 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
826 vector<const char*> extensionNames;
827 extensionNames.reserve(nonCoreExtensions.size());
828 for (const string& extension : nonCoreExtensions)
829 extensionNames.push_back(extension.c_str());
831 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceUniformBufferStandardLayoutFeatures>()))
833 static const Feature features[] =
835 FEATURE_ITEM (VkPhysicalDeviceUniformBufferStandardLayoutFeatures, uniformBufferStandardLayout),
837 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceUniformBufferStandardLayoutFeatures*>(featuresStruct);
838 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
842 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
844 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
848 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderSubgroupExtendedTypesFeatures (Context& context)
850 const PlatformInterface& vkp = context.getPlatformInterface();
851 tcu::TestLog& log = context.getTestContext().getLog();
852 tcu::ResultCollector resultCollector (log);
853 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
854 const InstanceDriver& instanceDriver (instance.getDriver());
855 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
856 const deUint32 queueFamilyIndex = 0;
857 const deUint32 queueCount = 1;
858 const float queuePriority = 1.0f;
859 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
860 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
862 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
863 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
865 VkPhysicalDeviceFeatures emptyDeviceFeatures;
866 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
868 // Only non-core extensions will be used when creating the device.
869 vector<const char*> coreExtensions;
870 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
871 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
873 vector<const char*> extensionNames;
874 extensionNames.reserve(nonCoreExtensions.size());
875 for (const string& extension : nonCoreExtensions)
876 extensionNames.push_back(extension.c_str());
878 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures>()))
880 static const Feature features[] =
882 FEATURE_ITEM (VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, shaderSubgroupExtendedTypes),
884 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>(featuresStruct);
885 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
889 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
891 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
895 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestSeparateDepthStencilLayoutsFeatures (Context& context)
897 const PlatformInterface& vkp = context.getPlatformInterface();
898 tcu::TestLog& log = context.getTestContext().getLog();
899 tcu::ResultCollector resultCollector (log);
900 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
901 const InstanceDriver& instanceDriver (instance.getDriver());
902 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
903 const deUint32 queueFamilyIndex = 0;
904 const deUint32 queueCount = 1;
905 const float queuePriority = 1.0f;
906 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
907 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
909 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
910 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
912 VkPhysicalDeviceFeatures emptyDeviceFeatures;
913 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
915 // Only non-core extensions will be used when creating the device.
916 vector<const char*> coreExtensions;
917 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
918 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
920 vector<const char*> extensionNames;
921 extensionNames.reserve(nonCoreExtensions.size());
922 for (const string& extension : nonCoreExtensions)
923 extensionNames.push_back(extension.c_str());
925 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures>()))
927 static const Feature features[] =
929 FEATURE_ITEM (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, separateDepthStencilLayouts),
931 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*>(featuresStruct);
932 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
936 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
938 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
942 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestHostQueryResetFeatures (Context& context)
944 const PlatformInterface& vkp = context.getPlatformInterface();
945 tcu::TestLog& log = context.getTestContext().getLog();
946 tcu::ResultCollector resultCollector (log);
947 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
948 const InstanceDriver& instanceDriver (instance.getDriver());
949 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
950 const deUint32 queueFamilyIndex = 0;
951 const deUint32 queueCount = 1;
952 const float queuePriority = 1.0f;
953 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
954 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
956 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
957 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
959 VkPhysicalDeviceFeatures emptyDeviceFeatures;
960 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
962 // Only non-core extensions will be used when creating the device.
963 vector<const char*> coreExtensions;
964 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
965 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
967 vector<const char*> extensionNames;
968 extensionNames.reserve(nonCoreExtensions.size());
969 for (const string& extension : nonCoreExtensions)
970 extensionNames.push_back(extension.c_str());
972 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceHostQueryResetFeatures>()))
974 static const Feature features[] =
976 FEATURE_ITEM (VkPhysicalDeviceHostQueryResetFeatures, hostQueryReset),
978 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceHostQueryResetFeatures*>(featuresStruct);
979 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
983 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
985 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
989 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestTimelineSemaphoreFeatures (Context& context)
991 const PlatformInterface& vkp = context.getPlatformInterface();
992 tcu::TestLog& log = context.getTestContext().getLog();
993 tcu::ResultCollector resultCollector (log);
994 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
995 const InstanceDriver& instanceDriver (instance.getDriver());
996 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
997 const deUint32 queueFamilyIndex = 0;
998 const deUint32 queueCount = 1;
999 const float queuePriority = 1.0f;
1000 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1001 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1003 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1004 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1006 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1007 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1009 // Only non-core extensions will be used when creating the device.
1010 vector<const char*> coreExtensions;
1011 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1012 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1014 vector<const char*> extensionNames;
1015 extensionNames.reserve(nonCoreExtensions.size());
1016 for (const string& extension : nonCoreExtensions)
1017 extensionNames.push_back(extension.c_str());
1019 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceTimelineSemaphoreFeatures>()))
1021 static const Feature features[] =
1023 FEATURE_ITEM (VkPhysicalDeviceTimelineSemaphoreFeatures, timelineSemaphore),
1025 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreFeatures*>(featuresStruct);
1026 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1030 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1032 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1036 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestBufferDeviceAddressFeatures (Context& context)
1038 const PlatformInterface& vkp = context.getPlatformInterface();
1039 tcu::TestLog& log = context.getTestContext().getLog();
1040 tcu::ResultCollector resultCollector (log);
1041 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1042 const InstanceDriver& instanceDriver (instance.getDriver());
1043 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1044 const deUint32 queueFamilyIndex = 0;
1045 const deUint32 queueCount = 1;
1046 const float queuePriority = 1.0f;
1047 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1048 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1050 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1051 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1053 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1054 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1056 // Only non-core extensions will be used when creating the device.
1057 vector<const char*> coreExtensions;
1058 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1059 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1061 vector<const char*> extensionNames;
1062 extensionNames.reserve(nonCoreExtensions.size());
1063 for (const string& extension : nonCoreExtensions)
1064 extensionNames.push_back(extension.c_str());
1066 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceBufferDeviceAddressFeatures>()))
1068 static const Feature features[] =
1070 FEATURE_ITEM (VkPhysicalDeviceBufferDeviceAddressFeatures, bufferDeviceAddress),
1071 FEATURE_ITEM (VkPhysicalDeviceBufferDeviceAddressFeatures, bufferDeviceAddressCaptureReplay),
1072 FEATURE_ITEM (VkPhysicalDeviceBufferDeviceAddressFeatures, bufferDeviceAddressMultiDevice),
1074 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceBufferDeviceAddressFeatures*>(featuresStruct);
1075 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1079 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1081 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1085 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVulkanSC10Features (Context& context)
1087 const PlatformInterface& vkp = context.getPlatformInterface();
1088 tcu::TestLog& log = context.getTestContext().getLog();
1089 tcu::ResultCollector resultCollector (log);
1090 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1091 const InstanceDriver& instanceDriver (instance.getDriver());
1092 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1093 const deUint32 queueFamilyIndex = 0;
1094 const deUint32 queueCount = 1;
1095 const float queuePriority = 1.0f;
1096 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1097 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1099 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1100 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1102 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1103 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1105 // Only non-core extensions will be used when creating the device.
1106 vector<const char*> coreExtensions;
1107 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1108 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1110 vector<const char*> extensionNames;
1111 extensionNames.reserve(nonCoreExtensions.size());
1112 for (const string& extension : nonCoreExtensions)
1113 extensionNames.push_back(extension.c_str());
1115 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVulkanSC10Features>()))
1117 static const Feature features[] =
1119 FEATURE_ITEM (VkPhysicalDeviceVulkanSC10Features, shaderAtomicInstructions),
1121 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVulkanSC10Features*>(featuresStruct);
1122 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1126 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1128 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1132 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestPerformanceQueryFeaturesKHR (Context& context)
1134 const PlatformInterface& vkp = context.getPlatformInterface();
1135 tcu::TestLog& log = context.getTestContext().getLog();
1136 tcu::ResultCollector resultCollector (log);
1137 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1138 const InstanceDriver& instanceDriver (instance.getDriver());
1139 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1140 const deUint32 queueFamilyIndex = 0;
1141 const deUint32 queueCount = 1;
1142 const float queuePriority = 1.0f;
1143 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1144 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1146 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1147 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1149 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1150 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1152 // Only non-core extensions will be used when creating the device.
1153 vector<const char*> coreExtensions;
1154 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1155 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1157 vector<const char*> extensionNames;
1158 extensionNames.reserve(nonCoreExtensions.size());
1159 for (const string& extension : nonCoreExtensions)
1160 extensionNames.push_back(extension.c_str());
1162 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDevicePerformanceQueryFeaturesKHR>()))
1164 static const Feature features[] =
1166 FEATURE_ITEM (VkPhysicalDevicePerformanceQueryFeaturesKHR, performanceCounterQueryPools),
1167 FEATURE_ITEM (VkPhysicalDevicePerformanceQueryFeaturesKHR, performanceCounterMultipleQueryPools),
1169 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDevicePerformanceQueryFeaturesKHR*>(featuresStruct);
1170 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1174 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1176 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1180 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderClockFeaturesKHR (Context& context)
1182 const PlatformInterface& vkp = context.getPlatformInterface();
1183 tcu::TestLog& log = context.getTestContext().getLog();
1184 tcu::ResultCollector resultCollector (log);
1185 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1186 const InstanceDriver& instanceDriver (instance.getDriver());
1187 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1188 const deUint32 queueFamilyIndex = 0;
1189 const deUint32 queueCount = 1;
1190 const float queuePriority = 1.0f;
1191 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1192 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1194 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1195 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1197 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1198 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1200 // Only non-core extensions will be used when creating the device.
1201 vector<const char*> coreExtensions;
1202 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1203 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1205 vector<const char*> extensionNames;
1206 extensionNames.reserve(nonCoreExtensions.size());
1207 for (const string& extension : nonCoreExtensions)
1208 extensionNames.push_back(extension.c_str());
1210 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderClockFeaturesKHR>()))
1212 static const Feature features[] =
1214 FEATURE_ITEM (VkPhysicalDeviceShaderClockFeaturesKHR, shaderSubgroupClock),
1215 FEATURE_ITEM (VkPhysicalDeviceShaderClockFeaturesKHR, shaderDeviceClock),
1217 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderClockFeaturesKHR*>(featuresStruct);
1218 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1222 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1224 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1228 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderTerminateInvocationFeaturesKHR (Context& context)
1230 const PlatformInterface& vkp = context.getPlatformInterface();
1231 tcu::TestLog& log = context.getTestContext().getLog();
1232 tcu::ResultCollector resultCollector (log);
1233 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1234 const InstanceDriver& instanceDriver (instance.getDriver());
1235 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1236 const deUint32 queueFamilyIndex = 0;
1237 const deUint32 queueCount = 1;
1238 const float queuePriority = 1.0f;
1239 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1240 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1242 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1243 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1245 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1246 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1248 // Only non-core extensions will be used when creating the device.
1249 vector<const char*> coreExtensions;
1250 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1251 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1253 vector<const char*> extensionNames;
1254 extensionNames.reserve(nonCoreExtensions.size());
1255 for (const string& extension : nonCoreExtensions)
1256 extensionNames.push_back(extension.c_str());
1258 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR>()))
1260 static const Feature features[] =
1262 FEATURE_ITEM (VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR, shaderTerminateInvocation),
1264 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR*>(featuresStruct);
1265 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1269 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1271 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1275 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestFragmentShadingRateFeaturesKHR (Context& context)
1277 const PlatformInterface& vkp = context.getPlatformInterface();
1278 tcu::TestLog& log = context.getTestContext().getLog();
1279 tcu::ResultCollector resultCollector (log);
1280 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1281 const InstanceDriver& instanceDriver (instance.getDriver());
1282 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1283 const deUint32 queueFamilyIndex = 0;
1284 const deUint32 queueCount = 1;
1285 const float queuePriority = 1.0f;
1286 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1287 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1289 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1290 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1292 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1293 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1295 // Only non-core extensions will be used when creating the device.
1296 vector<const char*> coreExtensions;
1297 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1298 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1300 vector<const char*> extensionNames;
1301 extensionNames.reserve(nonCoreExtensions.size());
1302 for (const string& extension : nonCoreExtensions)
1303 extensionNames.push_back(extension.c_str());
1305 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceFragmentShadingRateFeaturesKHR>()))
1307 static const Feature features[] =
1309 FEATURE_ITEM (VkPhysicalDeviceFragmentShadingRateFeaturesKHR, pipelineFragmentShadingRate),
1310 FEATURE_ITEM (VkPhysicalDeviceFragmentShadingRateFeaturesKHR, primitiveFragmentShadingRate),
1311 FEATURE_ITEM (VkPhysicalDeviceFragmentShadingRateFeaturesKHR, attachmentFragmentShadingRate),
1313 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceFragmentShadingRateFeaturesKHR*>(featuresStruct);
1314 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1318 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1320 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1324 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestSynchronization2FeaturesKHR (Context& context)
1326 const PlatformInterface& vkp = context.getPlatformInterface();
1327 tcu::TestLog& log = context.getTestContext().getLog();
1328 tcu::ResultCollector resultCollector (log);
1329 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1330 const InstanceDriver& instanceDriver (instance.getDriver());
1331 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1332 const deUint32 queueFamilyIndex = 0;
1333 const deUint32 queueCount = 1;
1334 const float queuePriority = 1.0f;
1335 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1336 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1338 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1339 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1341 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1342 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1344 // Only non-core extensions will be used when creating the device.
1345 vector<const char*> coreExtensions;
1346 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1347 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1349 vector<const char*> extensionNames;
1350 extensionNames.reserve(nonCoreExtensions.size());
1351 for (const string& extension : nonCoreExtensions)
1352 extensionNames.push_back(extension.c_str());
1354 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceSynchronization2FeaturesKHR>()))
1356 static const Feature features[] =
1358 FEATURE_ITEM (VkPhysicalDeviceSynchronization2FeaturesKHR, synchronization2),
1360 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceSynchronization2FeaturesKHR*>(featuresStruct);
1361 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1365 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1367 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1371 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestTextureCompressionASTCHDRFeaturesEXT (Context& context)
1373 const PlatformInterface& vkp = context.getPlatformInterface();
1374 tcu::TestLog& log = context.getTestContext().getLog();
1375 tcu::ResultCollector resultCollector (log);
1376 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1377 const InstanceDriver& instanceDriver (instance.getDriver());
1378 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1379 const deUint32 queueFamilyIndex = 0;
1380 const deUint32 queueCount = 1;
1381 const float queuePriority = 1.0f;
1382 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1383 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1385 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1386 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1388 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1389 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1391 // Only non-core extensions will be used when creating the device.
1392 vector<const char*> coreExtensions;
1393 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1394 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1396 vector<const char*> extensionNames;
1397 extensionNames.reserve(nonCoreExtensions.size());
1398 for (const string& extension : nonCoreExtensions)
1399 extensionNames.push_back(extension.c_str());
1401 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT>()))
1403 static const Feature features[] =
1405 FEATURE_ITEM (VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, textureCompressionASTC_HDR),
1407 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT*>(featuresStruct);
1408 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1412 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1414 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1418 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestASTCDecodeFeaturesEXT (Context& context)
1420 const PlatformInterface& vkp = context.getPlatformInterface();
1421 tcu::TestLog& log = context.getTestContext().getLog();
1422 tcu::ResultCollector resultCollector (log);
1423 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1424 const InstanceDriver& instanceDriver (instance.getDriver());
1425 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1426 const deUint32 queueFamilyIndex = 0;
1427 const deUint32 queueCount = 1;
1428 const float queuePriority = 1.0f;
1429 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1430 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1432 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1433 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1435 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1436 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1438 // Only non-core extensions will be used when creating the device.
1439 vector<const char*> coreExtensions;
1440 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1441 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1443 vector<const char*> extensionNames;
1444 extensionNames.reserve(nonCoreExtensions.size());
1445 for (const string& extension : nonCoreExtensions)
1446 extensionNames.push_back(extension.c_str());
1448 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceASTCDecodeFeaturesEXT>()))
1450 static const Feature features[] =
1452 FEATURE_ITEM (VkPhysicalDeviceASTCDecodeFeaturesEXT, decodeModeSharedExponent),
1454 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceASTCDecodeFeaturesEXT*>(featuresStruct);
1455 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1459 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1461 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1465 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestDepthClipEnableFeaturesEXT (Context& context)
1467 const PlatformInterface& vkp = context.getPlatformInterface();
1468 tcu::TestLog& log = context.getTestContext().getLog();
1469 tcu::ResultCollector resultCollector (log);
1470 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1471 const InstanceDriver& instanceDriver (instance.getDriver());
1472 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1473 const deUint32 queueFamilyIndex = 0;
1474 const deUint32 queueCount = 1;
1475 const float queuePriority = 1.0f;
1476 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1477 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1479 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1480 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1482 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1483 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1485 // Only non-core extensions will be used when creating the device.
1486 vector<const char*> coreExtensions;
1487 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1488 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1490 vector<const char*> extensionNames;
1491 extensionNames.reserve(nonCoreExtensions.size());
1492 for (const string& extension : nonCoreExtensions)
1493 extensionNames.push_back(extension.c_str());
1495 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceDepthClipEnableFeaturesEXT>()))
1497 static const Feature features[] =
1499 FEATURE_ITEM (VkPhysicalDeviceDepthClipEnableFeaturesEXT, depthClipEnable),
1501 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceDepthClipEnableFeaturesEXT*>(featuresStruct);
1502 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1506 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1508 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1512 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestBlendOperationAdvancedFeaturesEXT (Context& context)
1514 const PlatformInterface& vkp = context.getPlatformInterface();
1515 tcu::TestLog& log = context.getTestContext().getLog();
1516 tcu::ResultCollector resultCollector (log);
1517 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1518 const InstanceDriver& instanceDriver (instance.getDriver());
1519 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1520 const deUint32 queueFamilyIndex = 0;
1521 const deUint32 queueCount = 1;
1522 const float queuePriority = 1.0f;
1523 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1524 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1526 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1527 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1529 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1530 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1532 // Only non-core extensions will be used when creating the device.
1533 vector<const char*> coreExtensions;
1534 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1535 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1537 vector<const char*> extensionNames;
1538 extensionNames.reserve(nonCoreExtensions.size());
1539 for (const string& extension : nonCoreExtensions)
1540 extensionNames.push_back(extension.c_str());
1542 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT>()))
1544 static const Feature features[] =
1546 FEATURE_ITEM (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, advancedBlendCoherentOperations),
1548 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(featuresStruct);
1549 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1553 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1555 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1559 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVertexAttributeDivisorFeaturesEXT (Context& context)
1561 const PlatformInterface& vkp = context.getPlatformInterface();
1562 tcu::TestLog& log = context.getTestContext().getLog();
1563 tcu::ResultCollector resultCollector (log);
1564 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1565 const InstanceDriver& instanceDriver (instance.getDriver());
1566 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1567 const deUint32 queueFamilyIndex = 0;
1568 const deUint32 queueCount = 1;
1569 const float queuePriority = 1.0f;
1570 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1571 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1573 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1574 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1576 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1577 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1579 // Only non-core extensions will be used when creating the device.
1580 vector<const char*> coreExtensions;
1581 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1582 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1584 vector<const char*> extensionNames;
1585 extensionNames.reserve(nonCoreExtensions.size());
1586 for (const string& extension : nonCoreExtensions)
1587 extensionNames.push_back(extension.c_str());
1589 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT>()))
1591 static const Feature features[] =
1593 FEATURE_ITEM (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT, vertexAttributeInstanceRateDivisor),
1594 FEATURE_ITEM (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT, vertexAttributeInstanceRateZeroDivisor),
1596 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(featuresStruct);
1597 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1601 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1603 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1607 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestSubgroupSizeControlFeaturesEXT (Context& context)
1609 const PlatformInterface& vkp = context.getPlatformInterface();
1610 tcu::TestLog& log = context.getTestContext().getLog();
1611 tcu::ResultCollector resultCollector (log);
1612 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1613 const InstanceDriver& instanceDriver (instance.getDriver());
1614 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1615 const deUint32 queueFamilyIndex = 0;
1616 const deUint32 queueCount = 1;
1617 const float queuePriority = 1.0f;
1618 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1619 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1621 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1622 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1624 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1625 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1627 // Only non-core extensions will be used when creating the device.
1628 vector<const char*> coreExtensions;
1629 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1630 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1632 vector<const char*> extensionNames;
1633 extensionNames.reserve(nonCoreExtensions.size());
1634 for (const string& extension : nonCoreExtensions)
1635 extensionNames.push_back(extension.c_str());
1637 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceSubgroupSizeControlFeaturesEXT>()))
1639 static const Feature features[] =
1641 FEATURE_ITEM (VkPhysicalDeviceSubgroupSizeControlFeaturesEXT, subgroupSizeControl),
1642 FEATURE_ITEM (VkPhysicalDeviceSubgroupSizeControlFeaturesEXT, computeFullSubgroups),
1644 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceSubgroupSizeControlFeaturesEXT*>(featuresStruct);
1645 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1649 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1651 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1655 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderImageAtomicInt64FeaturesEXT (Context& context)
1657 const PlatformInterface& vkp = context.getPlatformInterface();
1658 tcu::TestLog& log = context.getTestContext().getLog();
1659 tcu::ResultCollector resultCollector (log);
1660 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1661 const InstanceDriver& instanceDriver (instance.getDriver());
1662 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1663 const deUint32 queueFamilyIndex = 0;
1664 const deUint32 queueCount = 1;
1665 const float queuePriority = 1.0f;
1666 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1667 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1669 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1670 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1672 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1673 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1675 // Only non-core extensions will be used when creating the device.
1676 vector<const char*> coreExtensions;
1677 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1678 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1680 vector<const char*> extensionNames;
1681 extensionNames.reserve(nonCoreExtensions.size());
1682 for (const string& extension : nonCoreExtensions)
1683 extensionNames.push_back(extension.c_str());
1685 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT>()))
1687 static const Feature features[] =
1689 FEATURE_ITEM (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, shaderImageInt64Atomics),
1690 FEATURE_ITEM (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, sparseImageInt64Atomics),
1692 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT*>(featuresStruct);
1693 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1697 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1699 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1703 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestFragmentShaderInterlockFeaturesEXT (Context& context)
1705 const PlatformInterface& vkp = context.getPlatformInterface();
1706 tcu::TestLog& log = context.getTestContext().getLog();
1707 tcu::ResultCollector resultCollector (log);
1708 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1709 const InstanceDriver& instanceDriver (instance.getDriver());
1710 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1711 const deUint32 queueFamilyIndex = 0;
1712 const deUint32 queueCount = 1;
1713 const float queuePriority = 1.0f;
1714 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1715 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1717 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1718 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1720 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1721 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1723 // Only non-core extensions will be used when creating the device.
1724 vector<const char*> coreExtensions;
1725 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1726 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1728 vector<const char*> extensionNames;
1729 extensionNames.reserve(nonCoreExtensions.size());
1730 for (const string& extension : nonCoreExtensions)
1731 extensionNames.push_back(extension.c_str());
1733 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT>()))
1735 static const Feature features[] =
1737 FEATURE_ITEM (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, fragmentShaderSampleInterlock),
1738 FEATURE_ITEM (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, fragmentShaderPixelInterlock),
1739 FEATURE_ITEM (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, fragmentShaderShadingRateInterlock),
1741 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT*>(featuresStruct);
1742 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1746 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1748 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1752 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestYcbcrImageArraysFeaturesEXT (Context& context)
1754 const PlatformInterface& vkp = context.getPlatformInterface();
1755 tcu::TestLog& log = context.getTestContext().getLog();
1756 tcu::ResultCollector resultCollector (log);
1757 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1758 const InstanceDriver& instanceDriver (instance.getDriver());
1759 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1760 const deUint32 queueFamilyIndex = 0;
1761 const deUint32 queueCount = 1;
1762 const float queuePriority = 1.0f;
1763 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1764 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1766 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1767 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1769 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1770 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1772 // Only non-core extensions will be used when creating the device.
1773 vector<const char*> coreExtensions;
1774 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1775 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1777 vector<const char*> extensionNames;
1778 extensionNames.reserve(nonCoreExtensions.size());
1779 for (const string& extension : nonCoreExtensions)
1780 extensionNames.push_back(extension.c_str());
1782 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceYcbcrImageArraysFeaturesEXT>()))
1784 static const Feature features[] =
1786 FEATURE_ITEM (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT, ycbcrImageArrays),
1788 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT*>(featuresStruct);
1789 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1793 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1795 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1799 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestLineRasterizationFeaturesEXT (Context& context)
1801 const PlatformInterface& vkp = context.getPlatformInterface();
1802 tcu::TestLog& log = context.getTestContext().getLog();
1803 tcu::ResultCollector resultCollector (log);
1804 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1805 const InstanceDriver& instanceDriver (instance.getDriver());
1806 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1807 const deUint32 queueFamilyIndex = 0;
1808 const deUint32 queueCount = 1;
1809 const float queuePriority = 1.0f;
1810 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1811 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1813 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1814 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1816 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1817 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1819 // Only non-core extensions will be used when creating the device.
1820 vector<const char*> coreExtensions;
1821 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1822 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1824 vector<const char*> extensionNames;
1825 extensionNames.reserve(nonCoreExtensions.size());
1826 for (const string& extension : nonCoreExtensions)
1827 extensionNames.push_back(extension.c_str());
1829 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceLineRasterizationFeaturesEXT>()))
1831 static const Feature features[] =
1833 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, rectangularLines),
1834 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, bresenhamLines),
1835 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, smoothLines),
1836 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, stippledRectangularLines),
1837 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, stippledBresenhamLines),
1838 FEATURE_ITEM (VkPhysicalDeviceLineRasterizationFeaturesEXT, stippledSmoothLines),
1840 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceLineRasterizationFeaturesEXT*>(featuresStruct);
1841 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 6, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1845 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1847 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1851 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderAtomicFloatFeaturesEXT (Context& context)
1853 const PlatformInterface& vkp = context.getPlatformInterface();
1854 tcu::TestLog& log = context.getTestContext().getLog();
1855 tcu::ResultCollector resultCollector (log);
1856 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1857 const InstanceDriver& instanceDriver (instance.getDriver());
1858 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1859 const deUint32 queueFamilyIndex = 0;
1860 const deUint32 queueCount = 1;
1861 const float queuePriority = 1.0f;
1862 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1863 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1865 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1866 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1868 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1869 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1871 // Only non-core extensions will be used when creating the device.
1872 vector<const char*> coreExtensions;
1873 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1874 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1876 vector<const char*> extensionNames;
1877 extensionNames.reserve(nonCoreExtensions.size());
1878 for (const string& extension : nonCoreExtensions)
1879 extensionNames.push_back(extension.c_str());
1881 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderAtomicFloatFeaturesEXT>()))
1883 static const Feature features[] =
1885 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderBufferFloat32Atomics),
1886 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderBufferFloat32AtomicAdd),
1887 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderBufferFloat64Atomics),
1888 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderBufferFloat64AtomicAdd),
1889 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderSharedFloat32Atomics),
1890 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderSharedFloat32AtomicAdd),
1891 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderSharedFloat64Atomics),
1892 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderSharedFloat64AtomicAdd),
1893 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderImageFloat32Atomics),
1894 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, shaderImageFloat32AtomicAdd),
1895 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, sparseImageFloat32Atomics),
1896 FEATURE_ITEM (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, sparseImageFloat32AtomicAdd),
1898 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT*>(featuresStruct);
1899 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 12, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1903 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1905 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1909 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestIndexTypeUint8FeaturesEXT (Context& context)
1911 const PlatformInterface& vkp = context.getPlatformInterface();
1912 tcu::TestLog& log = context.getTestContext().getLog();
1913 tcu::ResultCollector resultCollector (log);
1914 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1915 const InstanceDriver& instanceDriver (instance.getDriver());
1916 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1917 const deUint32 queueFamilyIndex = 0;
1918 const deUint32 queueCount = 1;
1919 const float queuePriority = 1.0f;
1920 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1921 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1923 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1924 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1926 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1927 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1929 // Only non-core extensions will be used when creating the device.
1930 vector<const char*> coreExtensions;
1931 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1932 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1934 vector<const char*> extensionNames;
1935 extensionNames.reserve(nonCoreExtensions.size());
1936 for (const string& extension : nonCoreExtensions)
1937 extensionNames.push_back(extension.c_str());
1939 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceIndexTypeUint8FeaturesEXT>()))
1941 static const Feature features[] =
1943 FEATURE_ITEM (VkPhysicalDeviceIndexTypeUint8FeaturesEXT, indexTypeUint8),
1945 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(featuresStruct);
1946 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1950 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1952 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
1956 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestExtendedDynamicStateFeaturesEXT (Context& context)
1958 const PlatformInterface& vkp = context.getPlatformInterface();
1959 tcu::TestLog& log = context.getTestContext().getLog();
1960 tcu::ResultCollector resultCollector (log);
1961 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
1962 const InstanceDriver& instanceDriver (instance.getDriver());
1963 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
1964 const deUint32 queueFamilyIndex = 0;
1965 const deUint32 queueCount = 1;
1966 const float queuePriority = 1.0f;
1967 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
1968 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
1970 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
1971 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
1973 VkPhysicalDeviceFeatures emptyDeviceFeatures;
1974 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
1976 // Only non-core extensions will be used when creating the device.
1977 vector<const char*> coreExtensions;
1978 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
1979 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
1981 vector<const char*> extensionNames;
1982 extensionNames.reserve(nonCoreExtensions.size());
1983 for (const string& extension : nonCoreExtensions)
1984 extensionNames.push_back(extension.c_str());
1986 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceExtendedDynamicStateFeaturesEXT>()))
1988 static const Feature features[] =
1990 FEATURE_ITEM (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, extendedDynamicState),
1992 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT*>(featuresStruct);
1993 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
1997 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
1999 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2003 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestShaderDemoteToHelperInvocationFeaturesEXT (Context& context)
2005 const PlatformInterface& vkp = context.getPlatformInterface();
2006 tcu::TestLog& log = context.getTestContext().getLog();
2007 tcu::ResultCollector resultCollector (log);
2008 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2009 const InstanceDriver& instanceDriver (instance.getDriver());
2010 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2011 const deUint32 queueFamilyIndex = 0;
2012 const deUint32 queueCount = 1;
2013 const float queuePriority = 1.0f;
2014 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2015 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2017 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2018 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2020 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2021 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2023 // Only non-core extensions will be used when creating the device.
2024 vector<const char*> coreExtensions;
2025 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2026 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2028 vector<const char*> extensionNames;
2029 extensionNames.reserve(nonCoreExtensions.size());
2030 for (const string& extension : nonCoreExtensions)
2031 extensionNames.push_back(extension.c_str());
2033 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT>()))
2035 static const Feature features[] =
2037 FEATURE_ITEM (VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, shaderDemoteToHelperInvocation),
2039 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT*>(featuresStruct);
2040 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2044 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2046 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2050 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestTexelBufferAlignmentFeaturesEXT (Context& context)
2052 const PlatformInterface& vkp = context.getPlatformInterface();
2053 tcu::TestLog& log = context.getTestContext().getLog();
2054 tcu::ResultCollector resultCollector (log);
2055 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2056 const InstanceDriver& instanceDriver (instance.getDriver());
2057 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2058 const deUint32 queueFamilyIndex = 0;
2059 const deUint32 queueCount = 1;
2060 const float queuePriority = 1.0f;
2061 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2062 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2064 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2065 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2067 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2068 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2070 // Only non-core extensions will be used when creating the device.
2071 vector<const char*> coreExtensions;
2072 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2073 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2075 vector<const char*> extensionNames;
2076 extensionNames.reserve(nonCoreExtensions.size());
2077 for (const string& extension : nonCoreExtensions)
2078 extensionNames.push_back(extension.c_str());
2080 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT>()))
2082 static const Feature features[] =
2084 FEATURE_ITEM (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT, texelBufferAlignment),
2086 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*>(featuresStruct);
2087 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2091 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2093 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2097 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestRobustness2FeaturesEXT (Context& context)
2099 const PlatformInterface& vkp = context.getPlatformInterface();
2100 tcu::TestLog& log = context.getTestContext().getLog();
2101 tcu::ResultCollector resultCollector (log);
2102 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2103 const InstanceDriver& instanceDriver (instance.getDriver());
2104 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2105 const deUint32 queueFamilyIndex = 0;
2106 const deUint32 queueCount = 1;
2107 const float queuePriority = 1.0f;
2108 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2109 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2111 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2112 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2114 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2115 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2117 // Only non-core extensions will be used when creating the device.
2118 vector<const char*> coreExtensions;
2119 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2120 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2122 vector<const char*> extensionNames;
2123 extensionNames.reserve(nonCoreExtensions.size());
2124 for (const string& extension : nonCoreExtensions)
2125 extensionNames.push_back(extension.c_str());
2127 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceRobustness2FeaturesEXT>()))
2129 static const Feature features[] =
2131 FEATURE_ITEM (VkPhysicalDeviceRobustness2FeaturesEXT, robustBufferAccess2),
2132 FEATURE_ITEM (VkPhysicalDeviceRobustness2FeaturesEXT, robustImageAccess2),
2133 FEATURE_ITEM (VkPhysicalDeviceRobustness2FeaturesEXT, nullDescriptor),
2135 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceRobustness2FeaturesEXT*>(featuresStruct);
2136 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2140 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2142 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2146 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestCustomBorderColorFeaturesEXT (Context& context)
2148 const PlatformInterface& vkp = context.getPlatformInterface();
2149 tcu::TestLog& log = context.getTestContext().getLog();
2150 tcu::ResultCollector resultCollector (log);
2151 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2152 const InstanceDriver& instanceDriver (instance.getDriver());
2153 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2154 const deUint32 queueFamilyIndex = 0;
2155 const deUint32 queueCount = 1;
2156 const float queuePriority = 1.0f;
2157 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2158 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2160 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2161 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2163 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2164 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2166 // Only non-core extensions will be used when creating the device.
2167 vector<const char*> coreExtensions;
2168 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2169 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2171 vector<const char*> extensionNames;
2172 extensionNames.reserve(nonCoreExtensions.size());
2173 for (const string& extension : nonCoreExtensions)
2174 extensionNames.push_back(extension.c_str());
2176 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceCustomBorderColorFeaturesEXT>()))
2178 static const Feature features[] =
2180 FEATURE_ITEM (VkPhysicalDeviceCustomBorderColorFeaturesEXT, customBorderColors),
2181 FEATURE_ITEM (VkPhysicalDeviceCustomBorderColorFeaturesEXT, customBorderColorWithoutFormat),
2183 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceCustomBorderColorFeaturesEXT*>(featuresStruct);
2184 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2188 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2190 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2194 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestYcbcr2Plane444FormatsFeaturesEXT (Context& context)
2196 const PlatformInterface& vkp = context.getPlatformInterface();
2197 tcu::TestLog& log = context.getTestContext().getLog();
2198 tcu::ResultCollector resultCollector (log);
2199 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2200 const InstanceDriver& instanceDriver (instance.getDriver());
2201 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2202 const deUint32 queueFamilyIndex = 0;
2203 const deUint32 queueCount = 1;
2204 const float queuePriority = 1.0f;
2205 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2206 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2208 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2209 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2211 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2212 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2214 // Only non-core extensions will be used when creating the device.
2215 vector<const char*> coreExtensions;
2216 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2217 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2219 vector<const char*> extensionNames;
2220 extensionNames.reserve(nonCoreExtensions.size());
2221 for (const string& extension : nonCoreExtensions)
2222 extensionNames.push_back(extension.c_str());
2224 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT>()))
2226 static const Feature features[] =
2228 FEATURE_ITEM (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, ycbcr2plane444Formats),
2230 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT*>(featuresStruct);
2231 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2235 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2237 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2241 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestImageRobustnessFeaturesEXT (Context& context)
2243 const PlatformInterface& vkp = context.getPlatformInterface();
2244 tcu::TestLog& log = context.getTestContext().getLog();
2245 tcu::ResultCollector resultCollector (log);
2246 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2247 const InstanceDriver& instanceDriver (instance.getDriver());
2248 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2249 const deUint32 queueFamilyIndex = 0;
2250 const deUint32 queueCount = 1;
2251 const float queuePriority = 1.0f;
2252 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2253 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2255 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2256 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2258 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2259 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2261 // Only non-core extensions will be used when creating the device.
2262 vector<const char*> coreExtensions;
2263 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2264 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2266 vector<const char*> extensionNames;
2267 extensionNames.reserve(nonCoreExtensions.size());
2268 for (const string& extension : nonCoreExtensions)
2269 extensionNames.push_back(extension.c_str());
2271 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceImageRobustnessFeaturesEXT>()))
2273 static const Feature features[] =
2275 FEATURE_ITEM (VkPhysicalDeviceImageRobustnessFeaturesEXT, robustImageAccess),
2277 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceImageRobustnessFeaturesEXT*>(featuresStruct);
2278 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2282 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2284 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2288 tcu::TestStatus createDeviceWithUnsupportedFeaturesTest4444FormatsFeaturesEXT (Context& context)
2290 const PlatformInterface& vkp = context.getPlatformInterface();
2291 tcu::TestLog& log = context.getTestContext().getLog();
2292 tcu::ResultCollector resultCollector (log);
2293 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2294 const InstanceDriver& instanceDriver (instance.getDriver());
2295 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2296 const deUint32 queueFamilyIndex = 0;
2297 const deUint32 queueCount = 1;
2298 const float queuePriority = 1.0f;
2299 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2300 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2302 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2303 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2305 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2306 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2308 // Only non-core extensions will be used when creating the device.
2309 vector<const char*> coreExtensions;
2310 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2311 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2313 vector<const char*> extensionNames;
2314 extensionNames.reserve(nonCoreExtensions.size());
2315 for (const string& extension : nonCoreExtensions)
2316 extensionNames.push_back(extension.c_str());
2318 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDevice4444FormatsFeaturesEXT>()))
2320 static const Feature features[] =
2322 FEATURE_ITEM (VkPhysicalDevice4444FormatsFeaturesEXT, formatA4R4G4B4),
2323 FEATURE_ITEM (VkPhysicalDevice4444FormatsFeaturesEXT, formatA4B4G4R4),
2325 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDevice4444FormatsFeaturesEXT*>(featuresStruct);
2326 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 2, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2330 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2332 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2336 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestVertexInputDynamicStateFeaturesEXT (Context& context)
2338 const PlatformInterface& vkp = context.getPlatformInterface();
2339 tcu::TestLog& log = context.getTestContext().getLog();
2340 tcu::ResultCollector resultCollector (log);
2341 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2342 const InstanceDriver& instanceDriver (instance.getDriver());
2343 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2344 const deUint32 queueFamilyIndex = 0;
2345 const deUint32 queueCount = 1;
2346 const float queuePriority = 1.0f;
2347 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2348 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2350 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2351 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2353 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2354 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2356 // Only non-core extensions will be used when creating the device.
2357 vector<const char*> coreExtensions;
2358 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2359 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2361 vector<const char*> extensionNames;
2362 extensionNames.reserve(nonCoreExtensions.size());
2363 for (const string& extension : nonCoreExtensions)
2364 extensionNames.push_back(extension.c_str());
2366 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT>()))
2368 static const Feature features[] =
2370 FEATURE_ITEM (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT, vertexInputDynamicState),
2372 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT*>(featuresStruct);
2373 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2377 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2379 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2383 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestExtendedDynamicState2FeaturesEXT (Context& context)
2385 const PlatformInterface& vkp = context.getPlatformInterface();
2386 tcu::TestLog& log = context.getTestContext().getLog();
2387 tcu::ResultCollector resultCollector (log);
2388 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2389 const InstanceDriver& instanceDriver (instance.getDriver());
2390 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2391 const deUint32 queueFamilyIndex = 0;
2392 const deUint32 queueCount = 1;
2393 const float queuePriority = 1.0f;
2394 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2395 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2397 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2398 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2400 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2401 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2403 // Only non-core extensions will be used when creating the device.
2404 vector<const char*> coreExtensions;
2405 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2406 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2408 vector<const char*> extensionNames;
2409 extensionNames.reserve(nonCoreExtensions.size());
2410 for (const string& extension : nonCoreExtensions)
2411 extensionNames.push_back(extension.c_str());
2413 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceExtendedDynamicState2FeaturesEXT>()))
2415 static const Feature features[] =
2417 FEATURE_ITEM (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, extendedDynamicState2),
2418 FEATURE_ITEM (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, extendedDynamicState2LogicOp),
2419 FEATURE_ITEM (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, extendedDynamicState2PatchControlPoints),
2421 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT*>(featuresStruct);
2422 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 3, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2426 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2428 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2432 tcu::TestStatus createDeviceWithUnsupportedFeaturesTestColorWriteEnableFeaturesEXT (Context& context)
2434 const PlatformInterface& vkp = context.getPlatformInterface();
2435 tcu::TestLog& log = context.getTestContext().getLog();
2436 tcu::ResultCollector resultCollector (log);
2437 const CustomInstance instance (createCustomInstanceWithExtensions(context, context.getInstanceExtensions(), DE_NULL, true));
2438 const InstanceDriver& instanceDriver (instance.getDriver());
2439 const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
2440 const deUint32 queueFamilyIndex = 0;
2441 const deUint32 queueCount = 1;
2442 const float queuePriority = 1.0f;
2443 const DeviceFeatures deviceFeaturesAll (context.getInstanceInterface(), context.getUsedApiVersion(), physicalDevice, context.getInstanceExtensions(), context.getDeviceExtensions(), DE_TRUE);
2444 const VkPhysicalDeviceFeatures2 deviceFeatures2 = deviceFeaturesAll.getCoreFeatures2();
2446 bool isSubProcess = context.getTestContext().getCommandLine().isSubProcess();
2447 VkDeviceObjectReservationCreateInfo memReservationStatMax = context.getResourceInterface()->getStatMax();
2449 VkPhysicalDeviceFeatures emptyDeviceFeatures;
2450 deMemset(&emptyDeviceFeatures, 0, sizeof(emptyDeviceFeatures));
2452 // Only non-core extensions will be used when creating the device.
2453 vector<const char*> coreExtensions;
2454 getCoreDeviceExtensions(context.getUsedApiVersion(), coreExtensions);
2455 vector<string> nonCoreExtensions(removeExtensions(context.getDeviceExtensions(), coreExtensions));
2457 vector<const char*> extensionNames;
2458 extensionNames.reserve(nonCoreExtensions.size());
2459 for (const string& extension : nonCoreExtensions)
2460 extensionNames.push_back(extension.c_str());
2462 if (const void* featuresStruct = findStructureInChain(const_cast<const void*>(deviceFeatures2.pNext), getStructureType<VkPhysicalDeviceColorWriteEnableFeaturesEXT>()))
2464 static const Feature features[] =
2466 FEATURE_ITEM (VkPhysicalDeviceColorWriteEnableFeaturesEXT, colorWriteEnable),
2468 auto* supportedFeatures = reinterpret_cast<const VkPhysicalDeviceColorWriteEnableFeaturesEXT*>(featuresStruct);
2469 checkFeatures(vkp, instance, instanceDriver, physicalDevice, 1, features, supportedFeatures, queueFamilyIndex, queueCount, queuePriority, numErrors, resultCollector, &extensionNames, emptyDeviceFeatures, memReservationStatMax, isSubProcess);
2473 return tcu::TestStatus(resultCollector.getResult(), "Enabling unsupported features didn't return VK_ERROR_FEATURE_NOT_PRESENT.");
2475 return tcu::TestStatus(resultCollector.getResult(), resultCollector.getMessage());
2479 void addSeparateUnsupportedFeatureTests (tcu::TestCaseGroup* testGroup)
2482 addFunctionCase(testGroup, "16_bit_storage_features", "createDeviceWithUnsupportedFeaturesTest16BitStorageFeatures", createDeviceWithUnsupportedFeaturesTest16BitStorageFeatures);
2483 addFunctionCase(testGroup, "multiview_features", "createDeviceWithUnsupportedFeaturesTestMultiviewFeatures", createDeviceWithUnsupportedFeaturesTestMultiviewFeatures);
2484 addFunctionCase(testGroup, "variable_pointers_features", "createDeviceWithUnsupportedFeaturesTestVariablePointersFeatures", createDeviceWithUnsupportedFeaturesTestVariablePointersFeatures);
2485 addFunctionCase(testGroup, "protected_memory_features", "createDeviceWithUnsupportedFeaturesTestProtectedMemoryFeatures", createDeviceWithUnsupportedFeaturesTestProtectedMemoryFeatures);
2486 addFunctionCase(testGroup, "sampler_ycbcr_conversion_features", "createDeviceWithUnsupportedFeaturesTestSamplerYcbcrConversionFeatures", createDeviceWithUnsupportedFeaturesTestSamplerYcbcrConversionFeatures);
2487 addFunctionCase(testGroup, "shader_draw_parameters_features", "createDeviceWithUnsupportedFeaturesTestShaderDrawParametersFeatures", createDeviceWithUnsupportedFeaturesTestShaderDrawParametersFeatures);
2488 addFunctionCase(testGroup, "vulkan11_features", "createDeviceWithUnsupportedFeaturesTestVulkan11Features", createDeviceWithUnsupportedFeaturesTestVulkan11Features);
2489 addFunctionCase(testGroup, "vulkan12_features", "createDeviceWithUnsupportedFeaturesTestVulkan12Features", createDeviceWithUnsupportedFeaturesTestVulkan12Features);
2490 addFunctionCase(testGroup, "8_bit_storage_features", "createDeviceWithUnsupportedFeaturesTest8BitStorageFeatures", createDeviceWithUnsupportedFeaturesTest8BitStorageFeatures);
2491 addFunctionCase(testGroup, "shader_atomic_int64_features", "createDeviceWithUnsupportedFeaturesTestShaderAtomicInt64Features", createDeviceWithUnsupportedFeaturesTestShaderAtomicInt64Features);
2492 addFunctionCase(testGroup, "shader_float16_int8_features", "createDeviceWithUnsupportedFeaturesTestShaderFloat16Int8Features", createDeviceWithUnsupportedFeaturesTestShaderFloat16Int8Features);
2493 addFunctionCase(testGroup, "descriptor_indexing_features", "createDeviceWithUnsupportedFeaturesTestDescriptorIndexingFeatures", createDeviceWithUnsupportedFeaturesTestDescriptorIndexingFeatures);
2494 addFunctionCase(testGroup, "scalar_block_layout_features", "createDeviceWithUnsupportedFeaturesTestScalarBlockLayoutFeatures", createDeviceWithUnsupportedFeaturesTestScalarBlockLayoutFeatures);
2495 addFunctionCase(testGroup, "vulkan_memory_model_features", "createDeviceWithUnsupportedFeaturesTestVulkanMemoryModelFeatures", createDeviceWithUnsupportedFeaturesTestVulkanMemoryModelFeatures);
2496 addFunctionCase(testGroup, "imageless_framebuffer_features", "createDeviceWithUnsupportedFeaturesTestImagelessFramebufferFeatures", createDeviceWithUnsupportedFeaturesTestImagelessFramebufferFeatures);
2497 addFunctionCase(testGroup, "uniform_buffer_standard_layout_features", "createDeviceWithUnsupportedFeaturesTestUniformBufferStandardLayoutFeatures", createDeviceWithUnsupportedFeaturesTestUniformBufferStandardLayoutFeatures);
2498 addFunctionCase(testGroup, "shader_subgroup_extended_types_features", "createDeviceWithUnsupportedFeaturesTestShaderSubgroupExtendedTypesFeatures", createDeviceWithUnsupportedFeaturesTestShaderSubgroupExtendedTypesFeatures);
2499 addFunctionCase(testGroup, "separate_depth_stencil_layouts_features", "createDeviceWithUnsupportedFeaturesTestSeparateDepthStencilLayoutsFeatures", createDeviceWithUnsupportedFeaturesTestSeparateDepthStencilLayoutsFeatures);
2500 addFunctionCase(testGroup, "host_query_reset_features", "createDeviceWithUnsupportedFeaturesTestHostQueryResetFeatures", createDeviceWithUnsupportedFeaturesTestHostQueryResetFeatures);
2501 addFunctionCase(testGroup, "timeline_semaphore_features", "createDeviceWithUnsupportedFeaturesTestTimelineSemaphoreFeatures", createDeviceWithUnsupportedFeaturesTestTimelineSemaphoreFeatures);
2502 addFunctionCase(testGroup, "buffer_device_address_features", "createDeviceWithUnsupportedFeaturesTestBufferDeviceAddressFeatures", createDeviceWithUnsupportedFeaturesTestBufferDeviceAddressFeatures);
2503 addFunctionCase(testGroup, "vulkan_sc10_features", "createDeviceWithUnsupportedFeaturesTestVulkanSC10Features", createDeviceWithUnsupportedFeaturesTestVulkanSC10Features);
2504 addFunctionCase(testGroup, "performance_query_features_khr", "createDeviceWithUnsupportedFeaturesTestPerformanceQueryFeaturesKHR", createDeviceWithUnsupportedFeaturesTestPerformanceQueryFeaturesKHR);
2505 addFunctionCase(testGroup, "shader_clock_features_khr", "createDeviceWithUnsupportedFeaturesTestShaderClockFeaturesKHR", createDeviceWithUnsupportedFeaturesTestShaderClockFeaturesKHR);
2506 addFunctionCase(testGroup, "shader_terminate_invocation_features_khr", "createDeviceWithUnsupportedFeaturesTestShaderTerminateInvocationFeaturesKHR", createDeviceWithUnsupportedFeaturesTestShaderTerminateInvocationFeaturesKHR);
2507 addFunctionCase(testGroup, "fragment_shading_rate_features_khr", "createDeviceWithUnsupportedFeaturesTestFragmentShadingRateFeaturesKHR", createDeviceWithUnsupportedFeaturesTestFragmentShadingRateFeaturesKHR);
2508 addFunctionCase(testGroup, "synchronization2_features_khr", "createDeviceWithUnsupportedFeaturesTestSynchronization2FeaturesKHR", createDeviceWithUnsupportedFeaturesTestSynchronization2FeaturesKHR);
2509 addFunctionCase(testGroup, "texture_compression_astchdr_features_ext", "createDeviceWithUnsupportedFeaturesTestTextureCompressionASTCHDRFeaturesEXT", createDeviceWithUnsupportedFeaturesTestTextureCompressionASTCHDRFeaturesEXT);
2510 addFunctionCase(testGroup, "astc_decode_features_ext", "createDeviceWithUnsupportedFeaturesTestASTCDecodeFeaturesEXT", createDeviceWithUnsupportedFeaturesTestASTCDecodeFeaturesEXT);
2511 addFunctionCase(testGroup, "depth_clip_enable_features_ext", "createDeviceWithUnsupportedFeaturesTestDepthClipEnableFeaturesEXT", createDeviceWithUnsupportedFeaturesTestDepthClipEnableFeaturesEXT);
2512 addFunctionCase(testGroup, "blend_operation_advanced_features_ext", "createDeviceWithUnsupportedFeaturesTestBlendOperationAdvancedFeaturesEXT", createDeviceWithUnsupportedFeaturesTestBlendOperationAdvancedFeaturesEXT);
2513 addFunctionCase(testGroup, "vertex_attribute_divisor_features_ext", "createDeviceWithUnsupportedFeaturesTestVertexAttributeDivisorFeaturesEXT", createDeviceWithUnsupportedFeaturesTestVertexAttributeDivisorFeaturesEXT);
2514 addFunctionCase(testGroup, "subgroup_size_control_features_ext", "createDeviceWithUnsupportedFeaturesTestSubgroupSizeControlFeaturesEXT", createDeviceWithUnsupportedFeaturesTestSubgroupSizeControlFeaturesEXT);
2515 addFunctionCase(testGroup, "shader_image_atomic_int64_features_ext", "createDeviceWithUnsupportedFeaturesTestShaderImageAtomicInt64FeaturesEXT", createDeviceWithUnsupportedFeaturesTestShaderImageAtomicInt64FeaturesEXT);
2516 addFunctionCase(testGroup, "fragment_shader_interlock_features_ext", "createDeviceWithUnsupportedFeaturesTestFragmentShaderInterlockFeaturesEXT", createDeviceWithUnsupportedFeaturesTestFragmentShaderInterlockFeaturesEXT);
2517 addFunctionCase(testGroup, "ycbcr_image_arrays_features_ext", "createDeviceWithUnsupportedFeaturesTestYcbcrImageArraysFeaturesEXT", createDeviceWithUnsupportedFeaturesTestYcbcrImageArraysFeaturesEXT);
2518 addFunctionCase(testGroup, "line_rasterization_features_ext", "createDeviceWithUnsupportedFeaturesTestLineRasterizationFeaturesEXT", createDeviceWithUnsupportedFeaturesTestLineRasterizationFeaturesEXT);
2519 addFunctionCase(testGroup, "shader_atomic_float_features_ext", "createDeviceWithUnsupportedFeaturesTestShaderAtomicFloatFeaturesEXT", createDeviceWithUnsupportedFeaturesTestShaderAtomicFloatFeaturesEXT);
2520 addFunctionCase(testGroup, "index_type_uint8_features_ext", "createDeviceWithUnsupportedFeaturesTestIndexTypeUint8FeaturesEXT", createDeviceWithUnsupportedFeaturesTestIndexTypeUint8FeaturesEXT);
2521 addFunctionCase(testGroup, "extended_dynamic_state_features_ext", "createDeviceWithUnsupportedFeaturesTestExtendedDynamicStateFeaturesEXT", createDeviceWithUnsupportedFeaturesTestExtendedDynamicStateFeaturesEXT);
2522 addFunctionCase(testGroup, "shader_demote_to_helper_invocation_features_ext", "createDeviceWithUnsupportedFeaturesTestShaderDemoteToHelperInvocationFeaturesEXT", createDeviceWithUnsupportedFeaturesTestShaderDemoteToHelperInvocationFeaturesEXT);
2523 addFunctionCase(testGroup, "texel_buffer_alignment_features_ext", "createDeviceWithUnsupportedFeaturesTestTexelBufferAlignmentFeaturesEXT", createDeviceWithUnsupportedFeaturesTestTexelBufferAlignmentFeaturesEXT);
2524 addFunctionCase(testGroup, "robustness2_features_ext", "createDeviceWithUnsupportedFeaturesTestRobustness2FeaturesEXT", createDeviceWithUnsupportedFeaturesTestRobustness2FeaturesEXT);
2525 addFunctionCase(testGroup, "custom_border_color_features_ext", "createDeviceWithUnsupportedFeaturesTestCustomBorderColorFeaturesEXT", createDeviceWithUnsupportedFeaturesTestCustomBorderColorFeaturesEXT);
2526 addFunctionCase(testGroup, "ycbcr2_plane444_formats_features_ext", "createDeviceWithUnsupportedFeaturesTestYcbcr2Plane444FormatsFeaturesEXT", createDeviceWithUnsupportedFeaturesTestYcbcr2Plane444FormatsFeaturesEXT);
2527 addFunctionCase(testGroup, "image_robustness_features_ext", "createDeviceWithUnsupportedFeaturesTestImageRobustnessFeaturesEXT", createDeviceWithUnsupportedFeaturesTestImageRobustnessFeaturesEXT);
2528 addFunctionCase(testGroup, "4444_formats_features_ext", "createDeviceWithUnsupportedFeaturesTest4444FormatsFeaturesEXT", createDeviceWithUnsupportedFeaturesTest4444FormatsFeaturesEXT);
2529 addFunctionCase(testGroup, "vertex_input_dynamic_state_features_ext", "createDeviceWithUnsupportedFeaturesTestVertexInputDynamicStateFeaturesEXT", createDeviceWithUnsupportedFeaturesTestVertexInputDynamicStateFeaturesEXT);
2530 addFunctionCase(testGroup, "extended_dynamic_state2_features_ext", "createDeviceWithUnsupportedFeaturesTestExtendedDynamicState2FeaturesEXT", createDeviceWithUnsupportedFeaturesTestExtendedDynamicState2FeaturesEXT);
2531 addFunctionCase(testGroup, "color_write_enable_features_ext", "createDeviceWithUnsupportedFeaturesTestColorWriteEnableFeaturesEXT", createDeviceWithUnsupportedFeaturesTestColorWriteEnableFeaturesEXT);