• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
4 */
5
6tcu::TestStatus testPhysicalDeviceFeaturePrivateDataFeatures (Context& context)
7{
8	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
9	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
10	const InstanceDriver&		vki				(instance.getDriver());
11	const int					count			= 2u;
12	TestLog&					log				= context.getTestContext().getLog();
13	VkPhysicalDeviceFeatures2	extFeatures;
14	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
15
16	VkPhysicalDevicePrivateDataFeatures	devicePrivateDataFeatures[count];
17	const bool							isPrivateDataFeatures = checkExtension(properties, "VK_EXT_private_data") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
18
19	for (int ndx = 0; ndx < count; ++ndx)
20	{
21		deMemset(&devicePrivateDataFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePrivateDataFeatures));
22		devicePrivateDataFeatures[ndx].sType = isPrivateDataFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
23		devicePrivateDataFeatures[ndx].pNext = DE_NULL;
24
25		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
26		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
27		extFeatures.pNext = &devicePrivateDataFeatures[ndx];
28
29		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
30	}
31
32	if (isPrivateDataFeatures)
33		log << TestLog::Message << devicePrivateDataFeatures[0] << TestLog::EndMessage;
34
35	if (isPrivateDataFeatures &&
36		(devicePrivateDataFeatures[0].privateData != devicePrivateDataFeatures[1].privateData))
37	{
38		TCU_FAIL("Mismatch between VkPhysicalDevicePrivateDataFeatures");
39	}
40	return tcu::TestStatus::pass("Querying succeeded");
41}
42
43tcu::TestStatus testPhysicalDeviceFeatureVariablePointersFeatures (Context& context)
44{
45	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
46	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
47	const InstanceDriver&		vki				(instance.getDriver());
48	const int					count			= 2u;
49	TestLog&					log				= context.getTestContext().getLog();
50	VkPhysicalDeviceFeatures2	extFeatures;
51	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
52
53	VkPhysicalDeviceVariablePointersFeatures	deviceVariablePointersFeatures[count];
54	const bool									isVariablePointersFeatures = checkExtension(properties, "VK_KHR_variable_pointers") || context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
55
56	for (int ndx = 0; ndx < count; ++ndx)
57	{
58		deMemset(&deviceVariablePointersFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVariablePointersFeatures));
59		deviceVariablePointersFeatures[ndx].sType = isVariablePointersFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
60		deviceVariablePointersFeatures[ndx].pNext = DE_NULL;
61
62		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
63		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
64		extFeatures.pNext = &deviceVariablePointersFeatures[ndx];
65
66		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
67	}
68
69	if (isVariablePointersFeatures)
70		log << TestLog::Message << deviceVariablePointersFeatures[0] << TestLog::EndMessage;
71
72	if (isVariablePointersFeatures &&
73		(deviceVariablePointersFeatures[0].variablePointersStorageBuffer != deviceVariablePointersFeatures[1].variablePointersStorageBuffer ||
74		 deviceVariablePointersFeatures[0].variablePointers != deviceVariablePointersFeatures[1].variablePointers))
75	{
76		TCU_FAIL("Mismatch between VkPhysicalDeviceVariablePointersFeatures");
77	}
78	return tcu::TestStatus::pass("Querying succeeded");
79}
80
81tcu::TestStatus testPhysicalDeviceFeatureMultiviewFeatures (Context& context)
82{
83	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
84	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
85	const InstanceDriver&		vki				(instance.getDriver());
86	const int					count			= 2u;
87	TestLog&					log				= context.getTestContext().getLog();
88	VkPhysicalDeviceFeatures2	extFeatures;
89	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
90
91	VkPhysicalDeviceMultiviewFeatures	deviceMultiviewFeatures[count];
92	const bool							isMultiviewFeatures = checkExtension(properties, "VK_KHR_multiview") || context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
93
94	for (int ndx = 0; ndx < count; ++ndx)
95	{
96		deMemset(&deviceMultiviewFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMultiviewFeatures));
97		deviceMultiviewFeatures[ndx].sType = isMultiviewFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
98		deviceMultiviewFeatures[ndx].pNext = DE_NULL;
99
100		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
101		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
102		extFeatures.pNext = &deviceMultiviewFeatures[ndx];
103
104		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
105	}
106
107	if (isMultiviewFeatures)
108		log << TestLog::Message << deviceMultiviewFeatures[0] << TestLog::EndMessage;
109
110	if (isMultiviewFeatures &&
111		(deviceMultiviewFeatures[0].multiview != deviceMultiviewFeatures[1].multiview ||
112		 deviceMultiviewFeatures[0].multiviewGeometryShader != deviceMultiviewFeatures[1].multiviewGeometryShader ||
113		 deviceMultiviewFeatures[0].multiviewTessellationShader != deviceMultiviewFeatures[1].multiviewTessellationShader))
114	{
115		TCU_FAIL("Mismatch between VkPhysicalDeviceMultiviewFeatures");
116	}
117	return tcu::TestStatus::pass("Querying succeeded");
118}
119
120tcu::TestStatus testPhysicalDeviceFeaturePresentIdFeaturesKHR (Context& context)
121{
122	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
123	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
124	const InstanceDriver&		vki				(instance.getDriver());
125	const int					count			= 2u;
126	TestLog&					log				= context.getTestContext().getLog();
127	VkPhysicalDeviceFeatures2	extFeatures;
128	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
129
130	VkPhysicalDevicePresentIdFeaturesKHR	devicePresentIdFeaturesKHR[count];
131	const bool								isPresentIdFeaturesKHR = checkExtension(properties, "VK_KHR_present_id");
132
133	for (int ndx = 0; ndx < count; ++ndx)
134	{
135		deMemset(&devicePresentIdFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePresentIdFeaturesKHR));
136		devicePresentIdFeaturesKHR[ndx].sType = isPresentIdFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
137		devicePresentIdFeaturesKHR[ndx].pNext = DE_NULL;
138
139		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
140		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
141		extFeatures.pNext = &devicePresentIdFeaturesKHR[ndx];
142
143		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
144	}
145
146	if (isPresentIdFeaturesKHR)
147		log << TestLog::Message << devicePresentIdFeaturesKHR[0] << TestLog::EndMessage;
148
149	if (isPresentIdFeaturesKHR &&
150		(devicePresentIdFeaturesKHR[0].presentId != devicePresentIdFeaturesKHR[1].presentId))
151	{
152		TCU_FAIL("Mismatch between VkPhysicalDevicePresentIdFeaturesKHR");
153	}
154	return tcu::TestStatus::pass("Querying succeeded");
155}
156
157tcu::TestStatus testPhysicalDeviceFeaturePresentWaitFeaturesKHR (Context& context)
158{
159	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
160	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
161	const InstanceDriver&		vki				(instance.getDriver());
162	const int					count			= 2u;
163	TestLog&					log				= context.getTestContext().getLog();
164	VkPhysicalDeviceFeatures2	extFeatures;
165	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
166
167	VkPhysicalDevicePresentWaitFeaturesKHR	devicePresentWaitFeaturesKHR[count];
168	const bool								isPresentWaitFeaturesKHR = checkExtension(properties, "VK_KHR_present_wait");
169
170	for (int ndx = 0; ndx < count; ++ndx)
171	{
172		deMemset(&devicePresentWaitFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePresentWaitFeaturesKHR));
173		devicePresentWaitFeaturesKHR[ndx].sType = isPresentWaitFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
174		devicePresentWaitFeaturesKHR[ndx].pNext = DE_NULL;
175
176		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
177		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
178		extFeatures.pNext = &devicePresentWaitFeaturesKHR[ndx];
179
180		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
181	}
182
183	if (isPresentWaitFeaturesKHR)
184		log << TestLog::Message << devicePresentWaitFeaturesKHR[0] << TestLog::EndMessage;
185
186	if (isPresentWaitFeaturesKHR &&
187		(devicePresentWaitFeaturesKHR[0].presentWait != devicePresentWaitFeaturesKHR[1].presentWait))
188	{
189		TCU_FAIL("Mismatch between VkPhysicalDevicePresentWaitFeaturesKHR");
190	}
191	return tcu::TestStatus::pass("Querying succeeded");
192}
193
194tcu::TestStatus testPhysicalDeviceFeature16BitStorageFeatures (Context& context)
195{
196	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
197	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
198	const InstanceDriver&		vki				(instance.getDriver());
199	const int					count			= 2u;
200	TestLog&					log				= context.getTestContext().getLog();
201	VkPhysicalDeviceFeatures2	extFeatures;
202	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
203
204	VkPhysicalDevice16BitStorageFeatures	device16BitStorageFeatures[count];
205	const bool								is16BitStorageFeatures = checkExtension(properties, "VK_KHR_16bit_storage") || context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
206
207	for (int ndx = 0; ndx < count; ++ndx)
208	{
209		deMemset(&device16BitStorageFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDevice16BitStorageFeatures));
210		device16BitStorageFeatures[ndx].sType = is16BitStorageFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
211		device16BitStorageFeatures[ndx].pNext = DE_NULL;
212
213		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
214		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
215		extFeatures.pNext = &device16BitStorageFeatures[ndx];
216
217		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
218	}
219
220	if (is16BitStorageFeatures)
221		log << TestLog::Message << device16BitStorageFeatures[0] << TestLog::EndMessage;
222
223	if (is16BitStorageFeatures &&
224		(device16BitStorageFeatures[0].storageBuffer16BitAccess != device16BitStorageFeatures[1].storageBuffer16BitAccess ||
225		 device16BitStorageFeatures[0].uniformAndStorageBuffer16BitAccess != device16BitStorageFeatures[1].uniformAndStorageBuffer16BitAccess ||
226		 device16BitStorageFeatures[0].storagePushConstant16 != device16BitStorageFeatures[1].storagePushConstant16 ||
227		 device16BitStorageFeatures[0].storageInputOutput16 != device16BitStorageFeatures[1].storageInputOutput16))
228	{
229		TCU_FAIL("Mismatch between VkPhysicalDevice16BitStorageFeatures");
230	}
231	return tcu::TestStatus::pass("Querying succeeded");
232}
233
234tcu::TestStatus testPhysicalDeviceFeatureShaderSubgroupExtendedTypesFeatures (Context& context)
235{
236	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
237	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
238	const InstanceDriver&		vki				(instance.getDriver());
239	const int					count			= 2u;
240	TestLog&					log				= context.getTestContext().getLog();
241	VkPhysicalDeviceFeatures2	extFeatures;
242	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
243
244	VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures	deviceShaderSubgroupExtendedTypesFeatures[count];
245	const bool											isShaderSubgroupExtendedTypesFeatures = checkExtension(properties, "VK_KHR_shader_subgroup_extended_types") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
246
247	for (int ndx = 0; ndx < count; ++ndx)
248	{
249		deMemset(&deviceShaderSubgroupExtendedTypesFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures));
250		deviceShaderSubgroupExtendedTypesFeatures[ndx].sType = isShaderSubgroupExtendedTypesFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
251		deviceShaderSubgroupExtendedTypesFeatures[ndx].pNext = DE_NULL;
252
253		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
254		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
255		extFeatures.pNext = &deviceShaderSubgroupExtendedTypesFeatures[ndx];
256
257		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
258	}
259
260	if (isShaderSubgroupExtendedTypesFeatures)
261		log << TestLog::Message << deviceShaderSubgroupExtendedTypesFeatures[0] << TestLog::EndMessage;
262
263	if (isShaderSubgroupExtendedTypesFeatures &&
264		(deviceShaderSubgroupExtendedTypesFeatures[0].shaderSubgroupExtendedTypes != deviceShaderSubgroupExtendedTypesFeatures[1].shaderSubgroupExtendedTypes))
265	{
266		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures");
267	}
268	return tcu::TestStatus::pass("Querying succeeded");
269}
270
271tcu::TestStatus testPhysicalDeviceFeatureSamplerYcbcrConversionFeatures (Context& context)
272{
273	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
274	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
275	const InstanceDriver&		vki				(instance.getDriver());
276	const int					count			= 2u;
277	TestLog&					log				= context.getTestContext().getLog();
278	VkPhysicalDeviceFeatures2	extFeatures;
279	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
280
281	VkPhysicalDeviceSamplerYcbcrConversionFeatures	deviceSamplerYcbcrConversionFeatures[count];
282	const bool										isSamplerYcbcrConversionFeatures = checkExtension(properties, "VK_KHR_sampler_ycbcr_conversion") || context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
283
284	for (int ndx = 0; ndx < count; ++ndx)
285	{
286		deMemset(&deviceSamplerYcbcrConversionFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures));
287		deviceSamplerYcbcrConversionFeatures[ndx].sType = isSamplerYcbcrConversionFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
288		deviceSamplerYcbcrConversionFeatures[ndx].pNext = DE_NULL;
289
290		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
291		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
292		extFeatures.pNext = &deviceSamplerYcbcrConversionFeatures[ndx];
293
294		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
295	}
296
297	if (isSamplerYcbcrConversionFeatures)
298		log << TestLog::Message << deviceSamplerYcbcrConversionFeatures[0] << TestLog::EndMessage;
299
300	if (isSamplerYcbcrConversionFeatures &&
301		(deviceSamplerYcbcrConversionFeatures[0].samplerYcbcrConversion != deviceSamplerYcbcrConversionFeatures[1].samplerYcbcrConversion))
302	{
303		TCU_FAIL("Mismatch between VkPhysicalDeviceSamplerYcbcrConversionFeatures");
304	}
305	return tcu::TestStatus::pass("Querying succeeded");
306}
307
308tcu::TestStatus testPhysicalDeviceFeatureProtectedMemoryFeatures (Context& context)
309{
310	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
311	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
312	const InstanceDriver&		vki				(instance.getDriver());
313	const int					count			= 2u;
314	TestLog&					log				= context.getTestContext().getLog();
315	VkPhysicalDeviceFeatures2	extFeatures;
316	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
317
318	VkPhysicalDeviceProtectedMemoryFeatures	deviceProtectedMemoryFeatures[count];
319	const bool								isProtectedMemoryFeatures = context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
320
321	for (int ndx = 0; ndx < count; ++ndx)
322	{
323		deMemset(&deviceProtectedMemoryFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceProtectedMemoryFeatures));
324		deviceProtectedMemoryFeatures[ndx].sType = isProtectedMemoryFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
325		deviceProtectedMemoryFeatures[ndx].pNext = DE_NULL;
326
327		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
328		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
329		extFeatures.pNext = &deviceProtectedMemoryFeatures[ndx];
330
331		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
332	}
333
334	if (isProtectedMemoryFeatures)
335		log << TestLog::Message << deviceProtectedMemoryFeatures[0] << TestLog::EndMessage;
336
337	if (isProtectedMemoryFeatures &&
338		(deviceProtectedMemoryFeatures[0].protectedMemory != deviceProtectedMemoryFeatures[1].protectedMemory))
339	{
340		TCU_FAIL("Mismatch between VkPhysicalDeviceProtectedMemoryFeatures");
341	}
342	return tcu::TestStatus::pass("Querying succeeded");
343}
344
345tcu::TestStatus testPhysicalDeviceFeatureBlendOperationAdvancedFeaturesEXT (Context& context)
346{
347	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
348	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
349	const InstanceDriver&		vki				(instance.getDriver());
350	const int					count			= 2u;
351	TestLog&					log				= context.getTestContext().getLog();
352	VkPhysicalDeviceFeatures2	extFeatures;
353	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
354
355	VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT	deviceBlendOperationAdvancedFeaturesEXT[count];
356	const bool											isBlendOperationAdvancedFeaturesEXT = checkExtension(properties, "VK_EXT_blend_operation_advanced");
357
358	for (int ndx = 0; ndx < count; ++ndx)
359	{
360		deMemset(&deviceBlendOperationAdvancedFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT));
361		deviceBlendOperationAdvancedFeaturesEXT[ndx].sType = isBlendOperationAdvancedFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
362		deviceBlendOperationAdvancedFeaturesEXT[ndx].pNext = DE_NULL;
363
364		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
365		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
366		extFeatures.pNext = &deviceBlendOperationAdvancedFeaturesEXT[ndx];
367
368		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
369	}
370
371	if (isBlendOperationAdvancedFeaturesEXT)
372		log << TestLog::Message << deviceBlendOperationAdvancedFeaturesEXT[0] << TestLog::EndMessage;
373
374	if (isBlendOperationAdvancedFeaturesEXT &&
375		(deviceBlendOperationAdvancedFeaturesEXT[0].advancedBlendCoherentOperations != deviceBlendOperationAdvancedFeaturesEXT[1].advancedBlendCoherentOperations))
376	{
377		TCU_FAIL("Mismatch between VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT");
378	}
379	return tcu::TestStatus::pass("Querying succeeded");
380}
381
382tcu::TestStatus testPhysicalDeviceFeatureMultiDrawFeaturesEXT (Context& context)
383{
384	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
385	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
386	const InstanceDriver&		vki				(instance.getDriver());
387	const int					count			= 2u;
388	TestLog&					log				= context.getTestContext().getLog();
389	VkPhysicalDeviceFeatures2	extFeatures;
390	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
391
392	VkPhysicalDeviceMultiDrawFeaturesEXT	deviceMultiDrawFeaturesEXT[count];
393	const bool								isMultiDrawFeaturesEXT = checkExtension(properties, "VK_EXT_multi_draw");
394
395	for (int ndx = 0; ndx < count; ++ndx)
396	{
397		deMemset(&deviceMultiDrawFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMultiDrawFeaturesEXT));
398		deviceMultiDrawFeaturesEXT[ndx].sType = isMultiDrawFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
399		deviceMultiDrawFeaturesEXT[ndx].pNext = DE_NULL;
400
401		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
402		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
403		extFeatures.pNext = &deviceMultiDrawFeaturesEXT[ndx];
404
405		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
406	}
407
408	if (isMultiDrawFeaturesEXT)
409		log << TestLog::Message << deviceMultiDrawFeaturesEXT[0] << TestLog::EndMessage;
410
411	if (isMultiDrawFeaturesEXT &&
412		(deviceMultiDrawFeaturesEXT[0].multiDraw != deviceMultiDrawFeaturesEXT[1].multiDraw))
413	{
414		TCU_FAIL("Mismatch between VkPhysicalDeviceMultiDrawFeaturesEXT");
415	}
416	return tcu::TestStatus::pass("Querying succeeded");
417}
418
419tcu::TestStatus testPhysicalDeviceFeatureInlineUniformBlockFeatures (Context& context)
420{
421	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
422	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
423	const InstanceDriver&		vki				(instance.getDriver());
424	const int					count			= 2u;
425	TestLog&					log				= context.getTestContext().getLog();
426	VkPhysicalDeviceFeatures2	extFeatures;
427	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
428
429	VkPhysicalDeviceInlineUniformBlockFeatures	deviceInlineUniformBlockFeatures[count];
430	const bool									isInlineUniformBlockFeatures = checkExtension(properties, "VK_EXT_inline_uniform_block") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
431
432	for (int ndx = 0; ndx < count; ++ndx)
433	{
434		deMemset(&deviceInlineUniformBlockFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceInlineUniformBlockFeatures));
435		deviceInlineUniformBlockFeatures[ndx].sType = isInlineUniformBlockFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
436		deviceInlineUniformBlockFeatures[ndx].pNext = DE_NULL;
437
438		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
439		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
440		extFeatures.pNext = &deviceInlineUniformBlockFeatures[ndx];
441
442		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
443	}
444
445	if (isInlineUniformBlockFeatures)
446		log << TestLog::Message << deviceInlineUniformBlockFeatures[0] << TestLog::EndMessage;
447
448	if (isInlineUniformBlockFeatures &&
449		(deviceInlineUniformBlockFeatures[0].inlineUniformBlock != deviceInlineUniformBlockFeatures[1].inlineUniformBlock ||
450		 deviceInlineUniformBlockFeatures[0].descriptorBindingInlineUniformBlockUpdateAfterBind != deviceInlineUniformBlockFeatures[1].descriptorBindingInlineUniformBlockUpdateAfterBind))
451	{
452		TCU_FAIL("Mismatch between VkPhysicalDeviceInlineUniformBlockFeatures");
453	}
454	return tcu::TestStatus::pass("Querying succeeded");
455}
456
457tcu::TestStatus testPhysicalDeviceFeatureMaintenance4Features (Context& context)
458{
459	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
460	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
461	const InstanceDriver&		vki				(instance.getDriver());
462	const int					count			= 2u;
463	TestLog&					log				= context.getTestContext().getLog();
464	VkPhysicalDeviceFeatures2	extFeatures;
465	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
466
467	VkPhysicalDeviceMaintenance4Features	deviceMaintenance4Features[count];
468	const bool								isMaintenance4Features = checkExtension(properties, "VK_KHR_maintenance4") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
469
470	for (int ndx = 0; ndx < count; ++ndx)
471	{
472		deMemset(&deviceMaintenance4Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMaintenance4Features));
473		deviceMaintenance4Features[ndx].sType = isMaintenance4Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
474		deviceMaintenance4Features[ndx].pNext = DE_NULL;
475
476		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
477		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
478		extFeatures.pNext = &deviceMaintenance4Features[ndx];
479
480		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
481	}
482
483	if (isMaintenance4Features)
484		log << TestLog::Message << deviceMaintenance4Features[0] << TestLog::EndMessage;
485
486	if (isMaintenance4Features &&
487		(deviceMaintenance4Features[0].maintenance4 != deviceMaintenance4Features[1].maintenance4))
488	{
489		TCU_FAIL("Mismatch between VkPhysicalDeviceMaintenance4Features");
490	}
491	return tcu::TestStatus::pass("Querying succeeded");
492}
493
494tcu::TestStatus testPhysicalDeviceFeatureShaderDrawParametersFeatures (Context& context)
495{
496	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
497	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
498	const InstanceDriver&		vki				(instance.getDriver());
499	const int					count			= 2u;
500	TestLog&					log				= context.getTestContext().getLog();
501	VkPhysicalDeviceFeatures2	extFeatures;
502	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
503
504	VkPhysicalDeviceShaderDrawParametersFeatures	deviceShaderDrawParametersFeatures[count];
505	const bool										isShaderDrawParametersFeatures = context.contextSupports(vk::ApiVersion(0, 1, 1, 0));
506
507	for (int ndx = 0; ndx < count; ++ndx)
508	{
509		deMemset(&deviceShaderDrawParametersFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderDrawParametersFeatures));
510		deviceShaderDrawParametersFeatures[ndx].sType = isShaderDrawParametersFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
511		deviceShaderDrawParametersFeatures[ndx].pNext = DE_NULL;
512
513		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
514		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
515		extFeatures.pNext = &deviceShaderDrawParametersFeatures[ndx];
516
517		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
518	}
519
520	if (isShaderDrawParametersFeatures)
521		log << TestLog::Message << deviceShaderDrawParametersFeatures[0] << TestLog::EndMessage;
522
523	if (isShaderDrawParametersFeatures &&
524		(deviceShaderDrawParametersFeatures[0].shaderDrawParameters != deviceShaderDrawParametersFeatures[1].shaderDrawParameters))
525	{
526		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderDrawParametersFeatures");
527	}
528	return tcu::TestStatus::pass("Querying succeeded");
529}
530
531tcu::TestStatus testPhysicalDeviceFeatureShaderFloat16Int8Features (Context& context)
532{
533	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
534	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
535	const InstanceDriver&		vki				(instance.getDriver());
536	const int					count			= 2u;
537	TestLog&					log				= context.getTestContext().getLog();
538	VkPhysicalDeviceFeatures2	extFeatures;
539	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
540
541	VkPhysicalDeviceShaderFloat16Int8Features	deviceShaderFloat16Int8Features[count];
542	const bool									isShaderFloat16Int8Features = checkExtension(properties, "VK_KHR_shader_float16_int8") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
543
544	for (int ndx = 0; ndx < count; ++ndx)
545	{
546		deMemset(&deviceShaderFloat16Int8Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderFloat16Int8Features));
547		deviceShaderFloat16Int8Features[ndx].sType = isShaderFloat16Int8Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
548		deviceShaderFloat16Int8Features[ndx].pNext = DE_NULL;
549
550		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
551		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
552		extFeatures.pNext = &deviceShaderFloat16Int8Features[ndx];
553
554		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
555	}
556
557	if (isShaderFloat16Int8Features)
558		log << TestLog::Message << deviceShaderFloat16Int8Features[0] << TestLog::EndMessage;
559
560	if (isShaderFloat16Int8Features &&
561		(deviceShaderFloat16Int8Features[0].shaderFloat16 != deviceShaderFloat16Int8Features[1].shaderFloat16 ||
562		 deviceShaderFloat16Int8Features[0].shaderInt8 != deviceShaderFloat16Int8Features[1].shaderInt8))
563	{
564		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderFloat16Int8Features");
565	}
566	return tcu::TestStatus::pass("Querying succeeded");
567}
568
569tcu::TestStatus testPhysicalDeviceFeatureHostQueryResetFeatures (Context& context)
570{
571	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
572	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
573	const InstanceDriver&		vki				(instance.getDriver());
574	const int					count			= 2u;
575	TestLog&					log				= context.getTestContext().getLog();
576	VkPhysicalDeviceFeatures2	extFeatures;
577	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
578
579	VkPhysicalDeviceHostQueryResetFeatures	deviceHostQueryResetFeatures[count];
580	const bool								isHostQueryResetFeatures = checkExtension(properties, "VK_EXT_host_query_reset") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
581
582	for (int ndx = 0; ndx < count; ++ndx)
583	{
584		deMemset(&deviceHostQueryResetFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceHostQueryResetFeatures));
585		deviceHostQueryResetFeatures[ndx].sType = isHostQueryResetFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
586		deviceHostQueryResetFeatures[ndx].pNext = DE_NULL;
587
588		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
589		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
590		extFeatures.pNext = &deviceHostQueryResetFeatures[ndx];
591
592		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
593	}
594
595	if (isHostQueryResetFeatures)
596		log << TestLog::Message << deviceHostQueryResetFeatures[0] << TestLog::EndMessage;
597
598	if (isHostQueryResetFeatures &&
599		(deviceHostQueryResetFeatures[0].hostQueryReset != deviceHostQueryResetFeatures[1].hostQueryReset))
600	{
601		TCU_FAIL("Mismatch between VkPhysicalDeviceHostQueryResetFeatures");
602	}
603	return tcu::TestStatus::pass("Querying succeeded");
604}
605
606tcu::TestStatus testPhysicalDeviceFeatureGlobalPriorityQueryFeaturesKHR (Context& context)
607{
608	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
609	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
610	const InstanceDriver&		vki				(instance.getDriver());
611	const int					count			= 2u;
612	TestLog&					log				= context.getTestContext().getLog();
613	VkPhysicalDeviceFeatures2	extFeatures;
614	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
615
616	VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR	deviceGlobalPriorityQueryFeaturesKHR[count];
617	const bool										isGlobalPriorityQueryFeaturesKHR = checkExtension(properties, "VK_KHR_global_priority");
618
619	for (int ndx = 0; ndx < count; ++ndx)
620	{
621		deMemset(&deviceGlobalPriorityQueryFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR));
622		deviceGlobalPriorityQueryFeaturesKHR[ndx].sType = isGlobalPriorityQueryFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
623		deviceGlobalPriorityQueryFeaturesKHR[ndx].pNext = DE_NULL;
624
625		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
626		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
627		extFeatures.pNext = &deviceGlobalPriorityQueryFeaturesKHR[ndx];
628
629		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
630	}
631
632	if (isGlobalPriorityQueryFeaturesKHR)
633		log << TestLog::Message << deviceGlobalPriorityQueryFeaturesKHR[0] << TestLog::EndMessage;
634
635	if (isGlobalPriorityQueryFeaturesKHR &&
636		(deviceGlobalPriorityQueryFeaturesKHR[0].globalPriorityQuery != deviceGlobalPriorityQueryFeaturesKHR[1].globalPriorityQuery))
637	{
638		TCU_FAIL("Mismatch between VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR");
639	}
640	return tcu::TestStatus::pass("Querying succeeded");
641}
642
643tcu::TestStatus testPhysicalDeviceFeatureDeviceMemoryReportFeaturesEXT (Context& context)
644{
645	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
646	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
647	const InstanceDriver&		vki				(instance.getDriver());
648	const int					count			= 2u;
649	TestLog&					log				= context.getTestContext().getLog();
650	VkPhysicalDeviceFeatures2	extFeatures;
651	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
652
653	VkPhysicalDeviceDeviceMemoryReportFeaturesEXT	deviceDeviceMemoryReportFeaturesEXT[count];
654	const bool										isDeviceMemoryReportFeaturesEXT = checkExtension(properties, "VK_EXT_device_memory_report");
655
656	for (int ndx = 0; ndx < count; ++ndx)
657	{
658		deMemset(&deviceDeviceMemoryReportFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDeviceMemoryReportFeaturesEXT));
659		deviceDeviceMemoryReportFeaturesEXT[ndx].sType = isDeviceMemoryReportFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
660		deviceDeviceMemoryReportFeaturesEXT[ndx].pNext = DE_NULL;
661
662		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
663		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
664		extFeatures.pNext = &deviceDeviceMemoryReportFeaturesEXT[ndx];
665
666		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
667	}
668
669	if (isDeviceMemoryReportFeaturesEXT)
670		log << TestLog::Message << deviceDeviceMemoryReportFeaturesEXT[0] << TestLog::EndMessage;
671
672	if (isDeviceMemoryReportFeaturesEXT &&
673		(deviceDeviceMemoryReportFeaturesEXT[0].deviceMemoryReport != deviceDeviceMemoryReportFeaturesEXT[1].deviceMemoryReport))
674	{
675		TCU_FAIL("Mismatch between VkPhysicalDeviceDeviceMemoryReportFeaturesEXT");
676	}
677	return tcu::TestStatus::pass("Querying succeeded");
678}
679
680tcu::TestStatus testPhysicalDeviceFeatureDescriptorIndexingFeatures (Context& context)
681{
682	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
683	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
684	const InstanceDriver&		vki				(instance.getDriver());
685	const int					count			= 2u;
686	TestLog&					log				= context.getTestContext().getLog();
687	VkPhysicalDeviceFeatures2	extFeatures;
688	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
689
690	VkPhysicalDeviceDescriptorIndexingFeatures	deviceDescriptorIndexingFeatures[count];
691	const bool									isDescriptorIndexingFeatures = checkExtension(properties, "VK_EXT_descriptor_indexing") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
692
693	for (int ndx = 0; ndx < count; ++ndx)
694	{
695		deMemset(&deviceDescriptorIndexingFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDescriptorIndexingFeatures));
696		deviceDescriptorIndexingFeatures[ndx].sType = isDescriptorIndexingFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
697		deviceDescriptorIndexingFeatures[ndx].pNext = DE_NULL;
698
699		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
700		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
701		extFeatures.pNext = &deviceDescriptorIndexingFeatures[ndx];
702
703		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
704	}
705
706	if (isDescriptorIndexingFeatures)
707		log << TestLog::Message << deviceDescriptorIndexingFeatures[0] << TestLog::EndMessage;
708
709	if (isDescriptorIndexingFeatures &&
710		(deviceDescriptorIndexingFeatures[0].shaderInputAttachmentArrayDynamicIndexing != deviceDescriptorIndexingFeatures[1].shaderInputAttachmentArrayDynamicIndexing ||
711		 deviceDescriptorIndexingFeatures[0].shaderUniformTexelBufferArrayDynamicIndexing != deviceDescriptorIndexingFeatures[1].shaderUniformTexelBufferArrayDynamicIndexing ||
712		 deviceDescriptorIndexingFeatures[0].shaderStorageTexelBufferArrayDynamicIndexing != deviceDescriptorIndexingFeatures[1].shaderStorageTexelBufferArrayDynamicIndexing ||
713		 deviceDescriptorIndexingFeatures[0].shaderUniformBufferArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderUniformBufferArrayNonUniformIndexing ||
714		 deviceDescriptorIndexingFeatures[0].shaderSampledImageArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderSampledImageArrayNonUniformIndexing ||
715		 deviceDescriptorIndexingFeatures[0].shaderStorageBufferArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderStorageBufferArrayNonUniformIndexing ||
716		 deviceDescriptorIndexingFeatures[0].shaderStorageImageArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderStorageImageArrayNonUniformIndexing ||
717		 deviceDescriptorIndexingFeatures[0].shaderInputAttachmentArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderInputAttachmentArrayNonUniformIndexing ||
718		 deviceDescriptorIndexingFeatures[0].shaderUniformTexelBufferArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderUniformTexelBufferArrayNonUniformIndexing ||
719		 deviceDescriptorIndexingFeatures[0].shaderStorageTexelBufferArrayNonUniformIndexing != deviceDescriptorIndexingFeatures[1].shaderStorageTexelBufferArrayNonUniformIndexing ||
720		 deviceDescriptorIndexingFeatures[0].descriptorBindingUniformBufferUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingUniformBufferUpdateAfterBind ||
721		 deviceDescriptorIndexingFeatures[0].descriptorBindingSampledImageUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingSampledImageUpdateAfterBind ||
722		 deviceDescriptorIndexingFeatures[0].descriptorBindingStorageImageUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingStorageImageUpdateAfterBind ||
723		 deviceDescriptorIndexingFeatures[0].descriptorBindingStorageBufferUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingStorageBufferUpdateAfterBind ||
724		 deviceDescriptorIndexingFeatures[0].descriptorBindingUniformTexelBufferUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingUniformTexelBufferUpdateAfterBind ||
725		 deviceDescriptorIndexingFeatures[0].descriptorBindingStorageTexelBufferUpdateAfterBind != deviceDescriptorIndexingFeatures[1].descriptorBindingStorageTexelBufferUpdateAfterBind ||
726		 deviceDescriptorIndexingFeatures[0].descriptorBindingUpdateUnusedWhilePending != deviceDescriptorIndexingFeatures[1].descriptorBindingUpdateUnusedWhilePending ||
727		 deviceDescriptorIndexingFeatures[0].descriptorBindingPartiallyBound != deviceDescriptorIndexingFeatures[1].descriptorBindingPartiallyBound ||
728		 deviceDescriptorIndexingFeatures[0].descriptorBindingVariableDescriptorCount != deviceDescriptorIndexingFeatures[1].descriptorBindingVariableDescriptorCount ||
729		 deviceDescriptorIndexingFeatures[0].runtimeDescriptorArray != deviceDescriptorIndexingFeatures[1].runtimeDescriptorArray))
730	{
731		TCU_FAIL("Mismatch between VkPhysicalDeviceDescriptorIndexingFeatures");
732	}
733	return tcu::TestStatus::pass("Querying succeeded");
734}
735
736tcu::TestStatus testPhysicalDeviceFeatureTimelineSemaphoreFeatures (Context& context)
737{
738	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
739	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
740	const InstanceDriver&		vki				(instance.getDriver());
741	const int					count			= 2u;
742	TestLog&					log				= context.getTestContext().getLog();
743	VkPhysicalDeviceFeatures2	extFeatures;
744	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
745
746	VkPhysicalDeviceTimelineSemaphoreFeatures	deviceTimelineSemaphoreFeatures[count];
747	const bool									isTimelineSemaphoreFeatures = checkExtension(properties, "VK_KHR_timeline_semaphore") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
748
749	for (int ndx = 0; ndx < count; ++ndx)
750	{
751		deMemset(&deviceTimelineSemaphoreFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures));
752		deviceTimelineSemaphoreFeatures[ndx].sType = isTimelineSemaphoreFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
753		deviceTimelineSemaphoreFeatures[ndx].pNext = DE_NULL;
754
755		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
756		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
757		extFeatures.pNext = &deviceTimelineSemaphoreFeatures[ndx];
758
759		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
760	}
761
762	if (isTimelineSemaphoreFeatures)
763		log << TestLog::Message << deviceTimelineSemaphoreFeatures[0] << TestLog::EndMessage;
764
765	if (isTimelineSemaphoreFeatures &&
766		(deviceTimelineSemaphoreFeatures[0].timelineSemaphore != deviceTimelineSemaphoreFeatures[1].timelineSemaphore))
767	{
768		TCU_FAIL("Mismatch between VkPhysicalDeviceTimelineSemaphoreFeatures");
769	}
770	return tcu::TestStatus::pass("Querying succeeded");
771}
772
773tcu::TestStatus testPhysicalDeviceFeature8BitStorageFeatures (Context& context)
774{
775	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
776	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
777	const InstanceDriver&		vki				(instance.getDriver());
778	const int					count			= 2u;
779	TestLog&					log				= context.getTestContext().getLog();
780	VkPhysicalDeviceFeatures2	extFeatures;
781	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
782
783	VkPhysicalDevice8BitStorageFeatures	device8BitStorageFeatures[count];
784	const bool							is8BitStorageFeatures = checkExtension(properties, "VK_KHR_8bit_storage") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
785
786	for (int ndx = 0; ndx < count; ++ndx)
787	{
788		deMemset(&device8BitStorageFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDevice8BitStorageFeatures));
789		device8BitStorageFeatures[ndx].sType = is8BitStorageFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
790		device8BitStorageFeatures[ndx].pNext = DE_NULL;
791
792		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
793		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
794		extFeatures.pNext = &device8BitStorageFeatures[ndx];
795
796		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
797	}
798
799	if (is8BitStorageFeatures)
800		log << TestLog::Message << device8BitStorageFeatures[0] << TestLog::EndMessage;
801
802	if (is8BitStorageFeatures &&
803		(device8BitStorageFeatures[0].storageBuffer8BitAccess != device8BitStorageFeatures[1].storageBuffer8BitAccess ||
804		 device8BitStorageFeatures[0].uniformAndStorageBuffer8BitAccess != device8BitStorageFeatures[1].uniformAndStorageBuffer8BitAccess ||
805		 device8BitStorageFeatures[0].storagePushConstant8 != device8BitStorageFeatures[1].storagePushConstant8))
806	{
807		TCU_FAIL("Mismatch between VkPhysicalDevice8BitStorageFeatures");
808	}
809	return tcu::TestStatus::pass("Querying succeeded");
810}
811
812tcu::TestStatus testPhysicalDeviceFeatureConditionalRenderingFeaturesEXT (Context& context)
813{
814	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
815	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
816	const InstanceDriver&		vki				(instance.getDriver());
817	const int					count			= 2u;
818	TestLog&					log				= context.getTestContext().getLog();
819	VkPhysicalDeviceFeatures2	extFeatures;
820	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
821
822	VkPhysicalDeviceConditionalRenderingFeaturesEXT	deviceConditionalRenderingFeaturesEXT[count];
823	const bool										isConditionalRenderingFeaturesEXT = checkExtension(properties, "VK_EXT_conditional_rendering");
824
825	for (int ndx = 0; ndx < count; ++ndx)
826	{
827		deMemset(&deviceConditionalRenderingFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT));
828		deviceConditionalRenderingFeaturesEXT[ndx].sType = isConditionalRenderingFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
829		deviceConditionalRenderingFeaturesEXT[ndx].pNext = DE_NULL;
830
831		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
832		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
833		extFeatures.pNext = &deviceConditionalRenderingFeaturesEXT[ndx];
834
835		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
836	}
837
838	if (isConditionalRenderingFeaturesEXT)
839		log << TestLog::Message << deviceConditionalRenderingFeaturesEXT[0] << TestLog::EndMessage;
840
841	if (isConditionalRenderingFeaturesEXT &&
842		(deviceConditionalRenderingFeaturesEXT[0].conditionalRendering != deviceConditionalRenderingFeaturesEXT[1].conditionalRendering ||
843		 deviceConditionalRenderingFeaturesEXT[0].inheritedConditionalRendering != deviceConditionalRenderingFeaturesEXT[1].inheritedConditionalRendering))
844	{
845		TCU_FAIL("Mismatch between VkPhysicalDeviceConditionalRenderingFeaturesEXT");
846	}
847	return tcu::TestStatus::pass("Querying succeeded");
848}
849
850tcu::TestStatus testPhysicalDeviceFeatureVulkanMemoryModelFeatures (Context& context)
851{
852	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
853	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
854	const InstanceDriver&		vki				(instance.getDriver());
855	const int					count			= 2u;
856	TestLog&					log				= context.getTestContext().getLog();
857	VkPhysicalDeviceFeatures2	extFeatures;
858	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
859
860	VkPhysicalDeviceVulkanMemoryModelFeatures	deviceVulkanMemoryModelFeatures[count];
861	const bool									isVulkanMemoryModelFeatures = checkExtension(properties, "VK_KHR_vulkan_memory_model") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
862
863	for (int ndx = 0; ndx < count; ++ndx)
864	{
865		deMemset(&deviceVulkanMemoryModelFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures));
866		deviceVulkanMemoryModelFeatures[ndx].sType = isVulkanMemoryModelFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
867		deviceVulkanMemoryModelFeatures[ndx].pNext = DE_NULL;
868
869		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
870		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
871		extFeatures.pNext = &deviceVulkanMemoryModelFeatures[ndx];
872
873		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
874	}
875
876	if (isVulkanMemoryModelFeatures)
877		log << TestLog::Message << deviceVulkanMemoryModelFeatures[0] << TestLog::EndMessage;
878
879	if (isVulkanMemoryModelFeatures &&
880		(deviceVulkanMemoryModelFeatures[0].vulkanMemoryModel != deviceVulkanMemoryModelFeatures[1].vulkanMemoryModel ||
881		 deviceVulkanMemoryModelFeatures[0].vulkanMemoryModelDeviceScope != deviceVulkanMemoryModelFeatures[1].vulkanMemoryModelDeviceScope ||
882		 deviceVulkanMemoryModelFeatures[0].vulkanMemoryModelAvailabilityVisibilityChains != deviceVulkanMemoryModelFeatures[1].vulkanMemoryModelAvailabilityVisibilityChains))
883	{
884		TCU_FAIL("Mismatch between VkPhysicalDeviceVulkanMemoryModelFeatures");
885	}
886	return tcu::TestStatus::pass("Querying succeeded");
887}
888
889tcu::TestStatus testPhysicalDeviceFeatureShaderAtomicInt64Features (Context& context)
890{
891	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
892	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
893	const InstanceDriver&		vki				(instance.getDriver());
894	const int					count			= 2u;
895	TestLog&					log				= context.getTestContext().getLog();
896	VkPhysicalDeviceFeatures2	extFeatures;
897	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
898
899	VkPhysicalDeviceShaderAtomicInt64Features	deviceShaderAtomicInt64Features[count];
900	const bool									isShaderAtomicInt64Features = checkExtension(properties, "VK_KHR_shader_atomic_int64") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
901
902	for (int ndx = 0; ndx < count; ++ndx)
903	{
904		deMemset(&deviceShaderAtomicInt64Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderAtomicInt64Features));
905		deviceShaderAtomicInt64Features[ndx].sType = isShaderAtomicInt64Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
906		deviceShaderAtomicInt64Features[ndx].pNext = DE_NULL;
907
908		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
909		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
910		extFeatures.pNext = &deviceShaderAtomicInt64Features[ndx];
911
912		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
913	}
914
915	if (isShaderAtomicInt64Features)
916		log << TestLog::Message << deviceShaderAtomicInt64Features[0] << TestLog::EndMessage;
917
918	if (isShaderAtomicInt64Features &&
919		(deviceShaderAtomicInt64Features[0].shaderBufferInt64Atomics != deviceShaderAtomicInt64Features[1].shaderBufferInt64Atomics ||
920		 deviceShaderAtomicInt64Features[0].shaderSharedInt64Atomics != deviceShaderAtomicInt64Features[1].shaderSharedInt64Atomics))
921	{
922		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderAtomicInt64Features");
923	}
924	return tcu::TestStatus::pass("Querying succeeded");
925}
926
927tcu::TestStatus testPhysicalDeviceFeatureShaderAtomicFloatFeaturesEXT (Context& context)
928{
929	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
930	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
931	const InstanceDriver&		vki				(instance.getDriver());
932	const int					count			= 2u;
933	TestLog&					log				= context.getTestContext().getLog();
934	VkPhysicalDeviceFeatures2	extFeatures;
935	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
936
937	VkPhysicalDeviceShaderAtomicFloatFeaturesEXT	deviceShaderAtomicFloatFeaturesEXT[count];
938	const bool										isShaderAtomicFloatFeaturesEXT = checkExtension(properties, "VK_EXT_shader_atomic_float");
939
940	for (int ndx = 0; ndx < count; ++ndx)
941	{
942		deMemset(&deviceShaderAtomicFloatFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT));
943		deviceShaderAtomicFloatFeaturesEXT[ndx].sType = isShaderAtomicFloatFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
944		deviceShaderAtomicFloatFeaturesEXT[ndx].pNext = DE_NULL;
945
946		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
947		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
948		extFeatures.pNext = &deviceShaderAtomicFloatFeaturesEXT[ndx];
949
950		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
951	}
952
953	if (isShaderAtomicFloatFeaturesEXT)
954		log << TestLog::Message << deviceShaderAtomicFloatFeaturesEXT[0] << TestLog::EndMessage;
955
956	if (isShaderAtomicFloatFeaturesEXT &&
957		(deviceShaderAtomicFloatFeaturesEXT[0].shaderBufferFloat32Atomics != deviceShaderAtomicFloatFeaturesEXT[1].shaderBufferFloat32Atomics ||
958		 deviceShaderAtomicFloatFeaturesEXT[0].shaderBufferFloat32AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].shaderBufferFloat32AtomicAdd ||
959		 deviceShaderAtomicFloatFeaturesEXT[0].shaderBufferFloat64Atomics != deviceShaderAtomicFloatFeaturesEXT[1].shaderBufferFloat64Atomics ||
960		 deviceShaderAtomicFloatFeaturesEXT[0].shaderBufferFloat64AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].shaderBufferFloat64AtomicAdd ||
961		 deviceShaderAtomicFloatFeaturesEXT[0].shaderSharedFloat32Atomics != deviceShaderAtomicFloatFeaturesEXT[1].shaderSharedFloat32Atomics ||
962		 deviceShaderAtomicFloatFeaturesEXT[0].shaderSharedFloat32AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].shaderSharedFloat32AtomicAdd ||
963		 deviceShaderAtomicFloatFeaturesEXT[0].shaderSharedFloat64Atomics != deviceShaderAtomicFloatFeaturesEXT[1].shaderSharedFloat64Atomics ||
964		 deviceShaderAtomicFloatFeaturesEXT[0].shaderSharedFloat64AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].shaderSharedFloat64AtomicAdd ||
965		 deviceShaderAtomicFloatFeaturesEXT[0].shaderImageFloat32Atomics != deviceShaderAtomicFloatFeaturesEXT[1].shaderImageFloat32Atomics ||
966		 deviceShaderAtomicFloatFeaturesEXT[0].shaderImageFloat32AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].shaderImageFloat32AtomicAdd ||
967		 deviceShaderAtomicFloatFeaturesEXT[0].sparseImageFloat32Atomics != deviceShaderAtomicFloatFeaturesEXT[1].sparseImageFloat32Atomics ||
968		 deviceShaderAtomicFloatFeaturesEXT[0].sparseImageFloat32AtomicAdd != deviceShaderAtomicFloatFeaturesEXT[1].sparseImageFloat32AtomicAdd))
969	{
970		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderAtomicFloatFeaturesEXT");
971	}
972	return tcu::TestStatus::pass("Querying succeeded");
973}
974
975tcu::TestStatus testPhysicalDeviceFeatureShaderAtomicFloat2FeaturesEXT (Context& context)
976{
977	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
978	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
979	const InstanceDriver&		vki				(instance.getDriver());
980	const int					count			= 2u;
981	TestLog&					log				= context.getTestContext().getLog();
982	VkPhysicalDeviceFeatures2	extFeatures;
983	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
984
985	VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT	deviceShaderAtomicFloat2FeaturesEXT[count];
986	const bool										isShaderAtomicFloat2FeaturesEXT = checkExtension(properties, "VK_EXT_shader_atomic_float2");
987
988	for (int ndx = 0; ndx < count; ++ndx)
989	{
990		deMemset(&deviceShaderAtomicFloat2FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT));
991		deviceShaderAtomicFloat2FeaturesEXT[ndx].sType = isShaderAtomicFloat2FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
992		deviceShaderAtomicFloat2FeaturesEXT[ndx].pNext = DE_NULL;
993
994		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
995		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
996		extFeatures.pNext = &deviceShaderAtomicFloat2FeaturesEXT[ndx];
997
998		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
999	}
1000
1001	if (isShaderAtomicFloat2FeaturesEXT)
1002		log << TestLog::Message << deviceShaderAtomicFloat2FeaturesEXT[0] << TestLog::EndMessage;
1003
1004	if (isShaderAtomicFloat2FeaturesEXT &&
1005		(deviceShaderAtomicFloat2FeaturesEXT[0].shaderBufferFloat16Atomics != deviceShaderAtomicFloat2FeaturesEXT[1].shaderBufferFloat16Atomics ||
1006		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderBufferFloat16AtomicAdd != deviceShaderAtomicFloat2FeaturesEXT[1].shaderBufferFloat16AtomicAdd ||
1007		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderBufferFloat16AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderBufferFloat16AtomicMinMax ||
1008		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderBufferFloat32AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderBufferFloat32AtomicMinMax ||
1009		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderBufferFloat64AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderBufferFloat64AtomicMinMax ||
1010		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderSharedFloat16Atomics != deviceShaderAtomicFloat2FeaturesEXT[1].shaderSharedFloat16Atomics ||
1011		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderSharedFloat16AtomicAdd != deviceShaderAtomicFloat2FeaturesEXT[1].shaderSharedFloat16AtomicAdd ||
1012		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderSharedFloat16AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderSharedFloat16AtomicMinMax ||
1013		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderSharedFloat32AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderSharedFloat32AtomicMinMax ||
1014		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderSharedFloat64AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderSharedFloat64AtomicMinMax ||
1015		 deviceShaderAtomicFloat2FeaturesEXT[0].shaderImageFloat32AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].shaderImageFloat32AtomicMinMax ||
1016		 deviceShaderAtomicFloat2FeaturesEXT[0].sparseImageFloat32AtomicMinMax != deviceShaderAtomicFloat2FeaturesEXT[1].sparseImageFloat32AtomicMinMax))
1017	{
1018		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT");
1019	}
1020	return tcu::TestStatus::pass("Querying succeeded");
1021}
1022
1023tcu::TestStatus testPhysicalDeviceFeatureVertexAttributeDivisorFeaturesEXT (Context& context)
1024{
1025	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1026	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1027	const InstanceDriver&		vki				(instance.getDriver());
1028	const int					count			= 2u;
1029	TestLog&					log				= context.getTestContext().getLog();
1030	VkPhysicalDeviceFeatures2	extFeatures;
1031	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1032
1033	VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT	deviceVertexAttributeDivisorFeaturesEXT[count];
1034	const bool											isVertexAttributeDivisorFeaturesEXT = checkExtension(properties, "VK_EXT_vertex_attribute_divisor");
1035
1036	for (int ndx = 0; ndx < count; ++ndx)
1037	{
1038		deMemset(&deviceVertexAttributeDivisorFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT));
1039		deviceVertexAttributeDivisorFeaturesEXT[ndx].sType = isVertexAttributeDivisorFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1040		deviceVertexAttributeDivisorFeaturesEXT[ndx].pNext = DE_NULL;
1041
1042		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1043		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1044		extFeatures.pNext = &deviceVertexAttributeDivisorFeaturesEXT[ndx];
1045
1046		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1047	}
1048
1049	if (isVertexAttributeDivisorFeaturesEXT)
1050		log << TestLog::Message << deviceVertexAttributeDivisorFeaturesEXT[0] << TestLog::EndMessage;
1051
1052	if (isVertexAttributeDivisorFeaturesEXT &&
1053		(deviceVertexAttributeDivisorFeaturesEXT[0].vertexAttributeInstanceRateDivisor != deviceVertexAttributeDivisorFeaturesEXT[1].vertexAttributeInstanceRateDivisor ||
1054		 deviceVertexAttributeDivisorFeaturesEXT[0].vertexAttributeInstanceRateZeroDivisor != deviceVertexAttributeDivisorFeaturesEXT[1].vertexAttributeInstanceRateZeroDivisor))
1055	{
1056		TCU_FAIL("Mismatch between VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT");
1057	}
1058	return tcu::TestStatus::pass("Querying succeeded");
1059}
1060
1061tcu::TestStatus testPhysicalDeviceFeatureASTCDecodeFeaturesEXT (Context& context)
1062{
1063	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1064	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1065	const InstanceDriver&		vki				(instance.getDriver());
1066	const int					count			= 2u;
1067	TestLog&					log				= context.getTestContext().getLog();
1068	VkPhysicalDeviceFeatures2	extFeatures;
1069	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1070
1071	VkPhysicalDeviceASTCDecodeFeaturesEXT	deviceASTCDecodeFeaturesEXT[count];
1072	const bool								isASTCDecodeFeaturesEXT = checkExtension(properties, "VK_EXT_astc_decode_mode");
1073
1074	for (int ndx = 0; ndx < count; ++ndx)
1075	{
1076		deMemset(&deviceASTCDecodeFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceASTCDecodeFeaturesEXT));
1077		deviceASTCDecodeFeaturesEXT[ndx].sType = isASTCDecodeFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1078		deviceASTCDecodeFeaturesEXT[ndx].pNext = DE_NULL;
1079
1080		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1081		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1082		extFeatures.pNext = &deviceASTCDecodeFeaturesEXT[ndx];
1083
1084		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1085	}
1086
1087	if (isASTCDecodeFeaturesEXT)
1088		log << TestLog::Message << deviceASTCDecodeFeaturesEXT[0] << TestLog::EndMessage;
1089
1090	if (isASTCDecodeFeaturesEXT &&
1091		(deviceASTCDecodeFeaturesEXT[0].decodeModeSharedExponent != deviceASTCDecodeFeaturesEXT[1].decodeModeSharedExponent))
1092	{
1093		TCU_FAIL("Mismatch between VkPhysicalDeviceASTCDecodeFeaturesEXT");
1094	}
1095	return tcu::TestStatus::pass("Querying succeeded");
1096}
1097
1098tcu::TestStatus testPhysicalDeviceFeatureTransformFeedbackFeaturesEXT (Context& context)
1099{
1100	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1101	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1102	const InstanceDriver&		vki				(instance.getDriver());
1103	const int					count			= 2u;
1104	TestLog&					log				= context.getTestContext().getLog();
1105	VkPhysicalDeviceFeatures2	extFeatures;
1106	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1107
1108	VkPhysicalDeviceTransformFeedbackFeaturesEXT	deviceTransformFeedbackFeaturesEXT[count];
1109	const bool										isTransformFeedbackFeaturesEXT = checkExtension(properties, "VK_EXT_transform_feedback");
1110
1111	for (int ndx = 0; ndx < count; ++ndx)
1112	{
1113		deMemset(&deviceTransformFeedbackFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT));
1114		deviceTransformFeedbackFeaturesEXT[ndx].sType = isTransformFeedbackFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1115		deviceTransformFeedbackFeaturesEXT[ndx].pNext = DE_NULL;
1116
1117		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1118		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1119		extFeatures.pNext = &deviceTransformFeedbackFeaturesEXT[ndx];
1120
1121		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1122	}
1123
1124	if (isTransformFeedbackFeaturesEXT)
1125		log << TestLog::Message << deviceTransformFeedbackFeaturesEXT[0] << TestLog::EndMessage;
1126
1127	if (isTransformFeedbackFeaturesEXT &&
1128		(deviceTransformFeedbackFeaturesEXT[0].transformFeedback != deviceTransformFeedbackFeaturesEXT[1].transformFeedback ||
1129		 deviceTransformFeedbackFeaturesEXT[0].geometryStreams != deviceTransformFeedbackFeaturesEXT[1].geometryStreams))
1130	{
1131		TCU_FAIL("Mismatch between VkPhysicalDeviceTransformFeedbackFeaturesEXT");
1132	}
1133	return tcu::TestStatus::pass("Querying succeeded");
1134}
1135
1136tcu::TestStatus testPhysicalDeviceFeatureMeshShaderFeaturesEXT (Context& context)
1137{
1138	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1139	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1140	const InstanceDriver&		vki				(instance.getDriver());
1141	const int					count			= 2u;
1142	TestLog&					log				= context.getTestContext().getLog();
1143	VkPhysicalDeviceFeatures2	extFeatures;
1144	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1145
1146	VkPhysicalDeviceMeshShaderFeaturesEXT	deviceMeshShaderFeaturesEXT[count];
1147	const bool								isMeshShaderFeaturesEXT = checkExtension(properties, "VK_EXT_mesh_shader");
1148
1149	for (int ndx = 0; ndx < count; ++ndx)
1150	{
1151		deMemset(&deviceMeshShaderFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMeshShaderFeaturesEXT));
1152		deviceMeshShaderFeaturesEXT[ndx].sType = isMeshShaderFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1153		deviceMeshShaderFeaturesEXT[ndx].pNext = DE_NULL;
1154
1155		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1156		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1157		extFeatures.pNext = &deviceMeshShaderFeaturesEXT[ndx];
1158
1159		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1160	}
1161
1162	if (isMeshShaderFeaturesEXT)
1163		log << TestLog::Message << deviceMeshShaderFeaturesEXT[0] << TestLog::EndMessage;
1164
1165	if (isMeshShaderFeaturesEXT &&
1166		(deviceMeshShaderFeaturesEXT[0].taskShader != deviceMeshShaderFeaturesEXT[1].taskShader ||
1167		 deviceMeshShaderFeaturesEXT[0].meshShader != deviceMeshShaderFeaturesEXT[1].meshShader ||
1168		 deviceMeshShaderFeaturesEXT[0].multiviewMeshShader != deviceMeshShaderFeaturesEXT[1].multiviewMeshShader ||
1169		 deviceMeshShaderFeaturesEXT[0].primitiveFragmentShadingRateMeshShader != deviceMeshShaderFeaturesEXT[1].primitiveFragmentShadingRateMeshShader ||
1170		 deviceMeshShaderFeaturesEXT[0].meshShaderQueries != deviceMeshShaderFeaturesEXT[1].meshShaderQueries))
1171	{
1172		TCU_FAIL("Mismatch between VkPhysicalDeviceMeshShaderFeaturesEXT");
1173	}
1174	return tcu::TestStatus::pass("Querying succeeded");
1175}
1176
1177tcu::TestStatus testPhysicalDeviceFeatureAccelerationStructureFeaturesKHR (Context& context)
1178{
1179	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1180	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1181	const InstanceDriver&		vki				(instance.getDriver());
1182	const int					count			= 2u;
1183	TestLog&					log				= context.getTestContext().getLog();
1184	VkPhysicalDeviceFeatures2	extFeatures;
1185	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1186
1187	VkPhysicalDeviceAccelerationStructureFeaturesKHR	deviceAccelerationStructureFeaturesKHR[count];
1188	const bool											isAccelerationStructureFeaturesKHR = checkExtension(properties, "VK_KHR_acceleration_structure");
1189
1190	for (int ndx = 0; ndx < count; ++ndx)
1191	{
1192		deMemset(&deviceAccelerationStructureFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceAccelerationStructureFeaturesKHR));
1193		deviceAccelerationStructureFeaturesKHR[ndx].sType = isAccelerationStructureFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1194		deviceAccelerationStructureFeaturesKHR[ndx].pNext = DE_NULL;
1195
1196		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1197		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1198		extFeatures.pNext = &deviceAccelerationStructureFeaturesKHR[ndx];
1199
1200		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1201	}
1202
1203	if (isAccelerationStructureFeaturesKHR)
1204		log << TestLog::Message << deviceAccelerationStructureFeaturesKHR[0] << TestLog::EndMessage;
1205
1206	if (isAccelerationStructureFeaturesKHR &&
1207		(deviceAccelerationStructureFeaturesKHR[0].accelerationStructure != deviceAccelerationStructureFeaturesKHR[1].accelerationStructure ||
1208		 deviceAccelerationStructureFeaturesKHR[0].accelerationStructureCaptureReplay != deviceAccelerationStructureFeaturesKHR[1].accelerationStructureCaptureReplay ||
1209		 deviceAccelerationStructureFeaturesKHR[0].accelerationStructureIndirectBuild != deviceAccelerationStructureFeaturesKHR[1].accelerationStructureIndirectBuild ||
1210		 deviceAccelerationStructureFeaturesKHR[0].accelerationStructureHostCommands != deviceAccelerationStructureFeaturesKHR[1].accelerationStructureHostCommands ||
1211		 deviceAccelerationStructureFeaturesKHR[0].descriptorBindingAccelerationStructureUpdateAfterBind != deviceAccelerationStructureFeaturesKHR[1].descriptorBindingAccelerationStructureUpdateAfterBind))
1212	{
1213		TCU_FAIL("Mismatch between VkPhysicalDeviceAccelerationStructureFeaturesKHR");
1214	}
1215	return tcu::TestStatus::pass("Querying succeeded");
1216}
1217
1218tcu::TestStatus testPhysicalDeviceFeatureRayTracingPipelineFeaturesKHR (Context& context)
1219{
1220	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1221	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1222	const InstanceDriver&		vki				(instance.getDriver());
1223	const int					count			= 2u;
1224	TestLog&					log				= context.getTestContext().getLog();
1225	VkPhysicalDeviceFeatures2	extFeatures;
1226	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1227
1228	VkPhysicalDeviceRayTracingPipelineFeaturesKHR	deviceRayTracingPipelineFeaturesKHR[count];
1229	const bool										isRayTracingPipelineFeaturesKHR = checkExtension(properties, "VK_KHR_ray_tracing_pipeline");
1230
1231	for (int ndx = 0; ndx < count; ++ndx)
1232	{
1233		deMemset(&deviceRayTracingPipelineFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRayTracingPipelineFeaturesKHR));
1234		deviceRayTracingPipelineFeaturesKHR[ndx].sType = isRayTracingPipelineFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1235		deviceRayTracingPipelineFeaturesKHR[ndx].pNext = DE_NULL;
1236
1237		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1238		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1239		extFeatures.pNext = &deviceRayTracingPipelineFeaturesKHR[ndx];
1240
1241		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1242	}
1243
1244	if (isRayTracingPipelineFeaturesKHR)
1245		log << TestLog::Message << deviceRayTracingPipelineFeaturesKHR[0] << TestLog::EndMessage;
1246
1247	if (isRayTracingPipelineFeaturesKHR &&
1248		(deviceRayTracingPipelineFeaturesKHR[0].rayTracingPipeline != deviceRayTracingPipelineFeaturesKHR[1].rayTracingPipeline ||
1249		 deviceRayTracingPipelineFeaturesKHR[0].rayTracingPipelineShaderGroupHandleCaptureReplay != deviceRayTracingPipelineFeaturesKHR[1].rayTracingPipelineShaderGroupHandleCaptureReplay ||
1250		 deviceRayTracingPipelineFeaturesKHR[0].rayTracingPipelineShaderGroupHandleCaptureReplayMixed != deviceRayTracingPipelineFeaturesKHR[1].rayTracingPipelineShaderGroupHandleCaptureReplayMixed ||
1251		 deviceRayTracingPipelineFeaturesKHR[0].rayTracingPipelineTraceRaysIndirect != deviceRayTracingPipelineFeaturesKHR[1].rayTracingPipelineTraceRaysIndirect ||
1252		 deviceRayTracingPipelineFeaturesKHR[0].rayTraversalPrimitiveCulling != deviceRayTracingPipelineFeaturesKHR[1].rayTraversalPrimitiveCulling))
1253	{
1254		TCU_FAIL("Mismatch between VkPhysicalDeviceRayTracingPipelineFeaturesKHR");
1255	}
1256	return tcu::TestStatus::pass("Querying succeeded");
1257}
1258
1259tcu::TestStatus testPhysicalDeviceFeatureRayQueryFeaturesKHR (Context& context)
1260{
1261	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1262	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1263	const InstanceDriver&		vki				(instance.getDriver());
1264	const int					count			= 2u;
1265	TestLog&					log				= context.getTestContext().getLog();
1266	VkPhysicalDeviceFeatures2	extFeatures;
1267	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1268
1269	VkPhysicalDeviceRayQueryFeaturesKHR	deviceRayQueryFeaturesKHR[count];
1270	const bool							isRayQueryFeaturesKHR = checkExtension(properties, "VK_KHR_ray_query");
1271
1272	for (int ndx = 0; ndx < count; ++ndx)
1273	{
1274		deMemset(&deviceRayQueryFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRayQueryFeaturesKHR));
1275		deviceRayQueryFeaturesKHR[ndx].sType = isRayQueryFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1276		deviceRayQueryFeaturesKHR[ndx].pNext = DE_NULL;
1277
1278		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1279		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1280		extFeatures.pNext = &deviceRayQueryFeaturesKHR[ndx];
1281
1282		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1283	}
1284
1285	if (isRayQueryFeaturesKHR)
1286		log << TestLog::Message << deviceRayQueryFeaturesKHR[0] << TestLog::EndMessage;
1287
1288	if (isRayQueryFeaturesKHR &&
1289		(deviceRayQueryFeaturesKHR[0].rayQuery != deviceRayQueryFeaturesKHR[1].rayQuery))
1290	{
1291		TCU_FAIL("Mismatch between VkPhysicalDeviceRayQueryFeaturesKHR");
1292	}
1293	return tcu::TestStatus::pass("Querying succeeded");
1294}
1295
1296tcu::TestStatus testPhysicalDeviceFeatureRayTracingMaintenance1FeaturesKHR (Context& context)
1297{
1298	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1299	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1300	const InstanceDriver&		vki				(instance.getDriver());
1301	const int					count			= 2u;
1302	TestLog&					log				= context.getTestContext().getLog();
1303	VkPhysicalDeviceFeatures2	extFeatures;
1304	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1305
1306	VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR	deviceRayTracingMaintenance1FeaturesKHR[count];
1307	const bool											isRayTracingMaintenance1FeaturesKHR = checkExtension(properties, "VK_KHR_ray_tracing_maintenance1");
1308
1309	for (int ndx = 0; ndx < count; ++ndx)
1310	{
1311		deMemset(&deviceRayTracingMaintenance1FeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR));
1312		deviceRayTracingMaintenance1FeaturesKHR[ndx].sType = isRayTracingMaintenance1FeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1313		deviceRayTracingMaintenance1FeaturesKHR[ndx].pNext = DE_NULL;
1314
1315		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1316		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1317		extFeatures.pNext = &deviceRayTracingMaintenance1FeaturesKHR[ndx];
1318
1319		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1320	}
1321
1322	if (isRayTracingMaintenance1FeaturesKHR)
1323		log << TestLog::Message << deviceRayTracingMaintenance1FeaturesKHR[0] << TestLog::EndMessage;
1324
1325	if (isRayTracingMaintenance1FeaturesKHR &&
1326		(deviceRayTracingMaintenance1FeaturesKHR[0].rayTracingMaintenance1 != deviceRayTracingMaintenance1FeaturesKHR[1].rayTracingMaintenance1 ||
1327		 deviceRayTracingMaintenance1FeaturesKHR[0].rayTracingPipelineTraceRaysIndirect2 != deviceRayTracingMaintenance1FeaturesKHR[1].rayTracingPipelineTraceRaysIndirect2))
1328	{
1329		TCU_FAIL("Mismatch between VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR");
1330	}
1331	return tcu::TestStatus::pass("Querying succeeded");
1332}
1333
1334tcu::TestStatus testPhysicalDeviceFeatureFragmentDensityMapFeaturesEXT (Context& context)
1335{
1336	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1337	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1338	const InstanceDriver&		vki				(instance.getDriver());
1339	const int					count			= 2u;
1340	TestLog&					log				= context.getTestContext().getLog();
1341	VkPhysicalDeviceFeatures2	extFeatures;
1342	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1343
1344	VkPhysicalDeviceFragmentDensityMapFeaturesEXT	deviceFragmentDensityMapFeaturesEXT[count];
1345	const bool										isFragmentDensityMapFeaturesEXT = checkExtension(properties, "VK_EXT_fragment_density_map");
1346
1347	for (int ndx = 0; ndx < count; ++ndx)
1348	{
1349		deMemset(&deviceFragmentDensityMapFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT));
1350		deviceFragmentDensityMapFeaturesEXT[ndx].sType = isFragmentDensityMapFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1351		deviceFragmentDensityMapFeaturesEXT[ndx].pNext = DE_NULL;
1352
1353		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1354		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1355		extFeatures.pNext = &deviceFragmentDensityMapFeaturesEXT[ndx];
1356
1357		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1358	}
1359
1360	if (isFragmentDensityMapFeaturesEXT)
1361		log << TestLog::Message << deviceFragmentDensityMapFeaturesEXT[0] << TestLog::EndMessage;
1362
1363	if (isFragmentDensityMapFeaturesEXT &&
1364		(deviceFragmentDensityMapFeaturesEXT[0].fragmentDensityMap != deviceFragmentDensityMapFeaturesEXT[1].fragmentDensityMap ||
1365		 deviceFragmentDensityMapFeaturesEXT[0].fragmentDensityMapDynamic != deviceFragmentDensityMapFeaturesEXT[1].fragmentDensityMapDynamic ||
1366		 deviceFragmentDensityMapFeaturesEXT[0].fragmentDensityMapNonSubsampledImages != deviceFragmentDensityMapFeaturesEXT[1].fragmentDensityMapNonSubsampledImages))
1367	{
1368		TCU_FAIL("Mismatch between VkPhysicalDeviceFragmentDensityMapFeaturesEXT");
1369	}
1370	return tcu::TestStatus::pass("Querying succeeded");
1371}
1372
1373tcu::TestStatus testPhysicalDeviceFeatureFragmentDensityMap2FeaturesEXT (Context& context)
1374{
1375	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1376	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1377	const InstanceDriver&		vki				(instance.getDriver());
1378	const int					count			= 2u;
1379	TestLog&					log				= context.getTestContext().getLog();
1380	VkPhysicalDeviceFeatures2	extFeatures;
1381	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1382
1383	VkPhysicalDeviceFragmentDensityMap2FeaturesEXT	deviceFragmentDensityMap2FeaturesEXT[count];
1384	const bool										isFragmentDensityMap2FeaturesEXT = checkExtension(properties, "VK_EXT_fragment_density_map2");
1385
1386	for (int ndx = 0; ndx < count; ++ndx)
1387	{
1388		deMemset(&deviceFragmentDensityMap2FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFragmentDensityMap2FeaturesEXT));
1389		deviceFragmentDensityMap2FeaturesEXT[ndx].sType = isFragmentDensityMap2FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1390		deviceFragmentDensityMap2FeaturesEXT[ndx].pNext = DE_NULL;
1391
1392		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1393		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1394		extFeatures.pNext = &deviceFragmentDensityMap2FeaturesEXT[ndx];
1395
1396		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1397	}
1398
1399	if (isFragmentDensityMap2FeaturesEXT)
1400		log << TestLog::Message << deviceFragmentDensityMap2FeaturesEXT[0] << TestLog::EndMessage;
1401
1402	if (isFragmentDensityMap2FeaturesEXT &&
1403		(deviceFragmentDensityMap2FeaturesEXT[0].fragmentDensityMapDeferred != deviceFragmentDensityMap2FeaturesEXT[1].fragmentDensityMapDeferred))
1404	{
1405		TCU_FAIL("Mismatch between VkPhysicalDeviceFragmentDensityMap2FeaturesEXT");
1406	}
1407	return tcu::TestStatus::pass("Querying succeeded");
1408}
1409
1410tcu::TestStatus testPhysicalDeviceFeatureScalarBlockLayoutFeatures (Context& context)
1411{
1412	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1413	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1414	const InstanceDriver&		vki				(instance.getDriver());
1415	const int					count			= 2u;
1416	TestLog&					log				= context.getTestContext().getLog();
1417	VkPhysicalDeviceFeatures2	extFeatures;
1418	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1419
1420	VkPhysicalDeviceScalarBlockLayoutFeatures	deviceScalarBlockLayoutFeatures[count];
1421	const bool									isScalarBlockLayoutFeatures = checkExtension(properties, "VK_EXT_scalar_block_layout") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
1422
1423	for (int ndx = 0; ndx < count; ++ndx)
1424	{
1425		deMemset(&deviceScalarBlockLayoutFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures));
1426		deviceScalarBlockLayoutFeatures[ndx].sType = isScalarBlockLayoutFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1427		deviceScalarBlockLayoutFeatures[ndx].pNext = DE_NULL;
1428
1429		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1430		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1431		extFeatures.pNext = &deviceScalarBlockLayoutFeatures[ndx];
1432
1433		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1434	}
1435
1436	if (isScalarBlockLayoutFeatures)
1437		log << TestLog::Message << deviceScalarBlockLayoutFeatures[0] << TestLog::EndMessage;
1438
1439	if (isScalarBlockLayoutFeatures &&
1440		(deviceScalarBlockLayoutFeatures[0].scalarBlockLayout != deviceScalarBlockLayoutFeatures[1].scalarBlockLayout))
1441	{
1442		TCU_FAIL("Mismatch between VkPhysicalDeviceScalarBlockLayoutFeatures");
1443	}
1444	return tcu::TestStatus::pass("Querying succeeded");
1445}
1446
1447tcu::TestStatus testPhysicalDeviceFeatureUniformBufferStandardLayoutFeatures (Context& context)
1448{
1449	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1450	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1451	const InstanceDriver&		vki				(instance.getDriver());
1452	const int					count			= 2u;
1453	TestLog&					log				= context.getTestContext().getLog();
1454	VkPhysicalDeviceFeatures2	extFeatures;
1455	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1456
1457	VkPhysicalDeviceUniformBufferStandardLayoutFeatures	deviceUniformBufferStandardLayoutFeatures[count];
1458	const bool											isUniformBufferStandardLayoutFeatures = checkExtension(properties, "VK_KHR_uniform_buffer_standard_layout") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
1459
1460	for (int ndx = 0; ndx < count; ++ndx)
1461	{
1462		deMemset(&deviceUniformBufferStandardLayoutFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures));
1463		deviceUniformBufferStandardLayoutFeatures[ndx].sType = isUniformBufferStandardLayoutFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1464		deviceUniformBufferStandardLayoutFeatures[ndx].pNext = DE_NULL;
1465
1466		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1467		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1468		extFeatures.pNext = &deviceUniformBufferStandardLayoutFeatures[ndx];
1469
1470		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1471	}
1472
1473	if (isUniformBufferStandardLayoutFeatures)
1474		log << TestLog::Message << deviceUniformBufferStandardLayoutFeatures[0] << TestLog::EndMessage;
1475
1476	if (isUniformBufferStandardLayoutFeatures &&
1477		(deviceUniformBufferStandardLayoutFeatures[0].uniformBufferStandardLayout != deviceUniformBufferStandardLayoutFeatures[1].uniformBufferStandardLayout))
1478	{
1479		TCU_FAIL("Mismatch between VkPhysicalDeviceUniformBufferStandardLayoutFeatures");
1480	}
1481	return tcu::TestStatus::pass("Querying succeeded");
1482}
1483
1484tcu::TestStatus testPhysicalDeviceFeatureDepthClipEnableFeaturesEXT (Context& context)
1485{
1486	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1487	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1488	const InstanceDriver&		vki				(instance.getDriver());
1489	const int					count			= 2u;
1490	TestLog&					log				= context.getTestContext().getLog();
1491	VkPhysicalDeviceFeatures2	extFeatures;
1492	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1493
1494	VkPhysicalDeviceDepthClipEnableFeaturesEXT	deviceDepthClipEnableFeaturesEXT[count];
1495	const bool									isDepthClipEnableFeaturesEXT = checkExtension(properties, "VK_EXT_depth_clip_enable");
1496
1497	for (int ndx = 0; ndx < count; ++ndx)
1498	{
1499		deMemset(&deviceDepthClipEnableFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT));
1500		deviceDepthClipEnableFeaturesEXT[ndx].sType = isDepthClipEnableFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1501		deviceDepthClipEnableFeaturesEXT[ndx].pNext = DE_NULL;
1502
1503		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1504		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1505		extFeatures.pNext = &deviceDepthClipEnableFeaturesEXT[ndx];
1506
1507		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1508	}
1509
1510	if (isDepthClipEnableFeaturesEXT)
1511		log << TestLog::Message << deviceDepthClipEnableFeaturesEXT[0] << TestLog::EndMessage;
1512
1513	if (isDepthClipEnableFeaturesEXT &&
1514		(deviceDepthClipEnableFeaturesEXT[0].depthClipEnable != deviceDepthClipEnableFeaturesEXT[1].depthClipEnable))
1515	{
1516		TCU_FAIL("Mismatch between VkPhysicalDeviceDepthClipEnableFeaturesEXT");
1517	}
1518	return tcu::TestStatus::pass("Querying succeeded");
1519}
1520
1521tcu::TestStatus testPhysicalDeviceFeatureMemoryPriorityFeaturesEXT (Context& context)
1522{
1523	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1524	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1525	const InstanceDriver&		vki				(instance.getDriver());
1526	const int					count			= 2u;
1527	TestLog&					log				= context.getTestContext().getLog();
1528	VkPhysicalDeviceFeatures2	extFeatures;
1529	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1530
1531	VkPhysicalDeviceMemoryPriorityFeaturesEXT	deviceMemoryPriorityFeaturesEXT[count];
1532	const bool									isMemoryPriorityFeaturesEXT = checkExtension(properties, "VK_EXT_memory_priority");
1533
1534	for (int ndx = 0; ndx < count; ++ndx)
1535	{
1536		deMemset(&deviceMemoryPriorityFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMemoryPriorityFeaturesEXT));
1537		deviceMemoryPriorityFeaturesEXT[ndx].sType = isMemoryPriorityFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1538		deviceMemoryPriorityFeaturesEXT[ndx].pNext = DE_NULL;
1539
1540		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1541		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1542		extFeatures.pNext = &deviceMemoryPriorityFeaturesEXT[ndx];
1543
1544		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1545	}
1546
1547	if (isMemoryPriorityFeaturesEXT)
1548		log << TestLog::Message << deviceMemoryPriorityFeaturesEXT[0] << TestLog::EndMessage;
1549
1550	if (isMemoryPriorityFeaturesEXT &&
1551		(deviceMemoryPriorityFeaturesEXT[0].memoryPriority != deviceMemoryPriorityFeaturesEXT[1].memoryPriority))
1552	{
1553		TCU_FAIL("Mismatch between VkPhysicalDeviceMemoryPriorityFeaturesEXT");
1554	}
1555	return tcu::TestStatus::pass("Querying succeeded");
1556}
1557
1558tcu::TestStatus testPhysicalDeviceFeaturePageableDeviceLocalMemoryFeaturesEXT (Context& context)
1559{
1560	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1561	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1562	const InstanceDriver&		vki				(instance.getDriver());
1563	const int					count			= 2u;
1564	TestLog&					log				= context.getTestContext().getLog();
1565	VkPhysicalDeviceFeatures2	extFeatures;
1566	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1567
1568	VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT	devicePageableDeviceLocalMemoryFeaturesEXT[count];
1569	const bool												isPageableDeviceLocalMemoryFeaturesEXT = checkExtension(properties, "VK_EXT_pageable_device_local_memory");
1570
1571	for (int ndx = 0; ndx < count; ++ndx)
1572	{
1573		deMemset(&devicePageableDeviceLocalMemoryFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT));
1574		devicePageableDeviceLocalMemoryFeaturesEXT[ndx].sType = isPageableDeviceLocalMemoryFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1575		devicePageableDeviceLocalMemoryFeaturesEXT[ndx].pNext = DE_NULL;
1576
1577		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1578		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1579		extFeatures.pNext = &devicePageableDeviceLocalMemoryFeaturesEXT[ndx];
1580
1581		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1582	}
1583
1584	if (isPageableDeviceLocalMemoryFeaturesEXT)
1585		log << TestLog::Message << devicePageableDeviceLocalMemoryFeaturesEXT[0] << TestLog::EndMessage;
1586
1587	if (isPageableDeviceLocalMemoryFeaturesEXT &&
1588		(devicePageableDeviceLocalMemoryFeaturesEXT[0].pageableDeviceLocalMemory != devicePageableDeviceLocalMemoryFeaturesEXT[1].pageableDeviceLocalMemory))
1589	{
1590		TCU_FAIL("Mismatch between VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT");
1591	}
1592	return tcu::TestStatus::pass("Querying succeeded");
1593}
1594
1595tcu::TestStatus testPhysicalDeviceFeatureBufferDeviceAddressFeatures (Context& context)
1596{
1597	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1598	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1599	const InstanceDriver&		vki				(instance.getDriver());
1600	const int					count			= 2u;
1601	TestLog&					log				= context.getTestContext().getLog();
1602	VkPhysicalDeviceFeatures2	extFeatures;
1603	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1604
1605	VkPhysicalDeviceBufferDeviceAddressFeatures	deviceBufferDeviceAddressFeatures[count];
1606	const bool									isBufferDeviceAddressFeatures = checkExtension(properties, "VK_KHR_buffer_device_address") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
1607
1608	for (int ndx = 0; ndx < count; ++ndx)
1609	{
1610		deMemset(&deviceBufferDeviceAddressFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures));
1611		deviceBufferDeviceAddressFeatures[ndx].sType = isBufferDeviceAddressFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1612		deviceBufferDeviceAddressFeatures[ndx].pNext = DE_NULL;
1613
1614		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1615		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1616		extFeatures.pNext = &deviceBufferDeviceAddressFeatures[ndx];
1617
1618		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1619	}
1620
1621	if (isBufferDeviceAddressFeatures)
1622		log << TestLog::Message << deviceBufferDeviceAddressFeatures[0] << TestLog::EndMessage;
1623
1624	if (isBufferDeviceAddressFeatures &&
1625		(deviceBufferDeviceAddressFeatures[0].bufferDeviceAddress != deviceBufferDeviceAddressFeatures[1].bufferDeviceAddress ||
1626		 deviceBufferDeviceAddressFeatures[0].bufferDeviceAddressCaptureReplay != deviceBufferDeviceAddressFeatures[1].bufferDeviceAddressCaptureReplay ||
1627		 deviceBufferDeviceAddressFeatures[0].bufferDeviceAddressMultiDevice != deviceBufferDeviceAddressFeatures[1].bufferDeviceAddressMultiDevice))
1628	{
1629		TCU_FAIL("Mismatch between VkPhysicalDeviceBufferDeviceAddressFeatures");
1630	}
1631	return tcu::TestStatus::pass("Querying succeeded");
1632}
1633
1634tcu::TestStatus testPhysicalDeviceFeatureBufferDeviceAddressFeaturesEXT (Context& context)
1635{
1636	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1637	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1638	const InstanceDriver&		vki				(instance.getDriver());
1639	const int					count			= 2u;
1640	TestLog&					log				= context.getTestContext().getLog();
1641	VkPhysicalDeviceFeatures2	extFeatures;
1642	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1643
1644	VkPhysicalDeviceBufferDeviceAddressFeaturesEXT	deviceBufferDeviceAddressFeaturesEXT[count];
1645	const bool										isBufferDeviceAddressFeaturesEXT = checkExtension(properties, "VK_EXT_buffer_device_address");
1646
1647	for (int ndx = 0; ndx < count; ++ndx)
1648	{
1649		deMemset(&deviceBufferDeviceAddressFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT));
1650		deviceBufferDeviceAddressFeaturesEXT[ndx].sType = isBufferDeviceAddressFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1651		deviceBufferDeviceAddressFeaturesEXT[ndx].pNext = DE_NULL;
1652
1653		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1654		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1655		extFeatures.pNext = &deviceBufferDeviceAddressFeaturesEXT[ndx];
1656
1657		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1658	}
1659
1660	if (isBufferDeviceAddressFeaturesEXT)
1661		log << TestLog::Message << deviceBufferDeviceAddressFeaturesEXT[0] << TestLog::EndMessage;
1662
1663	if (isBufferDeviceAddressFeaturesEXT &&
1664		(deviceBufferDeviceAddressFeaturesEXT[0].bufferDeviceAddress != deviceBufferDeviceAddressFeaturesEXT[1].bufferDeviceAddress ||
1665		 deviceBufferDeviceAddressFeaturesEXT[0].bufferDeviceAddressCaptureReplay != deviceBufferDeviceAddressFeaturesEXT[1].bufferDeviceAddressCaptureReplay ||
1666		 deviceBufferDeviceAddressFeaturesEXT[0].bufferDeviceAddressMultiDevice != deviceBufferDeviceAddressFeaturesEXT[1].bufferDeviceAddressMultiDevice))
1667	{
1668		TCU_FAIL("Mismatch between VkPhysicalDeviceBufferDeviceAddressFeaturesEXT");
1669	}
1670	return tcu::TestStatus::pass("Querying succeeded");
1671}
1672
1673tcu::TestStatus testPhysicalDeviceFeatureImagelessFramebufferFeatures (Context& context)
1674{
1675	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1676	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1677	const InstanceDriver&		vki				(instance.getDriver());
1678	const int					count			= 2u;
1679	TestLog&					log				= context.getTestContext().getLog();
1680	VkPhysicalDeviceFeatures2	extFeatures;
1681	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1682
1683	VkPhysicalDeviceImagelessFramebufferFeatures	deviceImagelessFramebufferFeatures[count];
1684	const bool										isImagelessFramebufferFeatures = checkExtension(properties, "VK_KHR_imageless_framebuffer") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
1685
1686	for (int ndx = 0; ndx < count; ++ndx)
1687	{
1688		deMemset(&deviceImagelessFramebufferFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImagelessFramebufferFeatures));
1689		deviceImagelessFramebufferFeatures[ndx].sType = isImagelessFramebufferFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1690		deviceImagelessFramebufferFeatures[ndx].pNext = DE_NULL;
1691
1692		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1693		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1694		extFeatures.pNext = &deviceImagelessFramebufferFeatures[ndx];
1695
1696		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1697	}
1698
1699	if (isImagelessFramebufferFeatures)
1700		log << TestLog::Message << deviceImagelessFramebufferFeatures[0] << TestLog::EndMessage;
1701
1702	if (isImagelessFramebufferFeatures &&
1703		(deviceImagelessFramebufferFeatures[0].imagelessFramebuffer != deviceImagelessFramebufferFeatures[1].imagelessFramebuffer))
1704	{
1705		TCU_FAIL("Mismatch between VkPhysicalDeviceImagelessFramebufferFeatures");
1706	}
1707	return tcu::TestStatus::pass("Querying succeeded");
1708}
1709
1710tcu::TestStatus testPhysicalDeviceFeatureTextureCompressionASTCHDRFeatures (Context& context)
1711{
1712	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1713	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1714	const InstanceDriver&		vki				(instance.getDriver());
1715	const int					count			= 2u;
1716	TestLog&					log				= context.getTestContext().getLog();
1717	VkPhysicalDeviceFeatures2	extFeatures;
1718	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1719
1720	VkPhysicalDeviceTextureCompressionASTCHDRFeatures	deviceTextureCompressionASTCHDRFeatures[count];
1721	const bool											isTextureCompressionASTCHDRFeatures = checkExtension(properties, "VK_EXT_texture_compression_astc_hdr") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
1722
1723	for (int ndx = 0; ndx < count; ++ndx)
1724	{
1725		deMemset(&deviceTextureCompressionASTCHDRFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures));
1726		deviceTextureCompressionASTCHDRFeatures[ndx].sType = isTextureCompressionASTCHDRFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1727		deviceTextureCompressionASTCHDRFeatures[ndx].pNext = DE_NULL;
1728
1729		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1730		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1731		extFeatures.pNext = &deviceTextureCompressionASTCHDRFeatures[ndx];
1732
1733		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1734	}
1735
1736	if (isTextureCompressionASTCHDRFeatures)
1737		log << TestLog::Message << deviceTextureCompressionASTCHDRFeatures[0] << TestLog::EndMessage;
1738
1739	if (isTextureCompressionASTCHDRFeatures &&
1740		(deviceTextureCompressionASTCHDRFeatures[0].textureCompressionASTC_HDR != deviceTextureCompressionASTCHDRFeatures[1].textureCompressionASTC_HDR))
1741	{
1742		TCU_FAIL("Mismatch between VkPhysicalDeviceTextureCompressionASTCHDRFeatures");
1743	}
1744	return tcu::TestStatus::pass("Querying succeeded");
1745}
1746
1747tcu::TestStatus testPhysicalDeviceFeatureYcbcrImageArraysFeaturesEXT (Context& context)
1748{
1749	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1750	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1751	const InstanceDriver&		vki				(instance.getDriver());
1752	const int					count			= 2u;
1753	TestLog&					log				= context.getTestContext().getLog();
1754	VkPhysicalDeviceFeatures2	extFeatures;
1755	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1756
1757	VkPhysicalDeviceYcbcrImageArraysFeaturesEXT	deviceYcbcrImageArraysFeaturesEXT[count];
1758	const bool									isYcbcrImageArraysFeaturesEXT = checkExtension(properties, "VK_EXT_ycbcr_image_arrays");
1759
1760	for (int ndx = 0; ndx < count; ++ndx)
1761	{
1762		deMemset(&deviceYcbcrImageArraysFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT));
1763		deviceYcbcrImageArraysFeaturesEXT[ndx].sType = isYcbcrImageArraysFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1764		deviceYcbcrImageArraysFeaturesEXT[ndx].pNext = DE_NULL;
1765
1766		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1767		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1768		extFeatures.pNext = &deviceYcbcrImageArraysFeaturesEXT[ndx];
1769
1770		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1771	}
1772
1773	if (isYcbcrImageArraysFeaturesEXT)
1774		log << TestLog::Message << deviceYcbcrImageArraysFeaturesEXT[0] << TestLog::EndMessage;
1775
1776	if (isYcbcrImageArraysFeaturesEXT &&
1777		(deviceYcbcrImageArraysFeaturesEXT[0].ycbcrImageArrays != deviceYcbcrImageArraysFeaturesEXT[1].ycbcrImageArrays))
1778	{
1779		TCU_FAIL("Mismatch between VkPhysicalDeviceYcbcrImageArraysFeaturesEXT");
1780	}
1781	return tcu::TestStatus::pass("Querying succeeded");
1782}
1783
1784tcu::TestStatus testPhysicalDeviceFeaturePerformanceQueryFeaturesKHR (Context& context)
1785{
1786	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1787	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1788	const InstanceDriver&		vki				(instance.getDriver());
1789	const int					count			= 2u;
1790	TestLog&					log				= context.getTestContext().getLog();
1791	VkPhysicalDeviceFeatures2	extFeatures;
1792	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1793
1794	VkPhysicalDevicePerformanceQueryFeaturesKHR	devicePerformanceQueryFeaturesKHR[count];
1795	const bool									isPerformanceQueryFeaturesKHR = checkExtension(properties, "VK_KHR_performance_query");
1796
1797	for (int ndx = 0; ndx < count; ++ndx)
1798	{
1799		deMemset(&devicePerformanceQueryFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePerformanceQueryFeaturesKHR));
1800		devicePerformanceQueryFeaturesKHR[ndx].sType = isPerformanceQueryFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1801		devicePerformanceQueryFeaturesKHR[ndx].pNext = DE_NULL;
1802
1803		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1804		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1805		extFeatures.pNext = &devicePerformanceQueryFeaturesKHR[ndx];
1806
1807		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1808	}
1809
1810	if (isPerformanceQueryFeaturesKHR)
1811		log << TestLog::Message << devicePerformanceQueryFeaturesKHR[0] << TestLog::EndMessage;
1812
1813	if (isPerformanceQueryFeaturesKHR &&
1814		(devicePerformanceQueryFeaturesKHR[0].performanceCounterQueryPools != devicePerformanceQueryFeaturesKHR[1].performanceCounterQueryPools ||
1815		 devicePerformanceQueryFeaturesKHR[0].performanceCounterMultipleQueryPools != devicePerformanceQueryFeaturesKHR[1].performanceCounterMultipleQueryPools))
1816	{
1817		TCU_FAIL("Mismatch between VkPhysicalDevicePerformanceQueryFeaturesKHR");
1818	}
1819	return tcu::TestStatus::pass("Querying succeeded");
1820}
1821
1822tcu::TestStatus testPhysicalDeviceFeatureShaderClockFeaturesKHR (Context& context)
1823{
1824	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1825	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1826	const InstanceDriver&		vki				(instance.getDriver());
1827	const int					count			= 2u;
1828	TestLog&					log				= context.getTestContext().getLog();
1829	VkPhysicalDeviceFeatures2	extFeatures;
1830	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1831
1832	VkPhysicalDeviceShaderClockFeaturesKHR	deviceShaderClockFeaturesKHR[count];
1833	const bool								isShaderClockFeaturesKHR = checkExtension(properties, "VK_KHR_shader_clock");
1834
1835	for (int ndx = 0; ndx < count; ++ndx)
1836	{
1837		deMemset(&deviceShaderClockFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderClockFeaturesKHR));
1838		deviceShaderClockFeaturesKHR[ndx].sType = isShaderClockFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
1839		deviceShaderClockFeaturesKHR[ndx].pNext = DE_NULL;
1840
1841		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1842		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1843		extFeatures.pNext = &deviceShaderClockFeaturesKHR[ndx];
1844
1845		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1846	}
1847
1848	if (isShaderClockFeaturesKHR)
1849		log << TestLog::Message << deviceShaderClockFeaturesKHR[0] << TestLog::EndMessage;
1850
1851	if (isShaderClockFeaturesKHR &&
1852		(deviceShaderClockFeaturesKHR[0].shaderSubgroupClock != deviceShaderClockFeaturesKHR[1].shaderSubgroupClock ||
1853		 deviceShaderClockFeaturesKHR[0].shaderDeviceClock != deviceShaderClockFeaturesKHR[1].shaderDeviceClock))
1854	{
1855		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderClockFeaturesKHR");
1856	}
1857	return tcu::TestStatus::pass("Querying succeeded");
1858}
1859
1860tcu::TestStatus testPhysicalDeviceFeatureIndexTypeUint8FeaturesEXT (Context& context)
1861{
1862	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1863	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1864	const InstanceDriver&		vki				(instance.getDriver());
1865	const int					count			= 2u;
1866	TestLog&					log				= context.getTestContext().getLog();
1867	VkPhysicalDeviceFeatures2	extFeatures;
1868	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1869
1870	VkPhysicalDeviceIndexTypeUint8FeaturesEXT	deviceIndexTypeUint8FeaturesEXT[count];
1871	const bool									isIndexTypeUint8FeaturesEXT = checkExtension(properties, "VK_EXT_index_type_uint8");
1872
1873	for (int ndx = 0; ndx < count; ++ndx)
1874	{
1875		deMemset(&deviceIndexTypeUint8FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceIndexTypeUint8FeaturesEXT));
1876		deviceIndexTypeUint8FeaturesEXT[ndx].sType = isIndexTypeUint8FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1877		deviceIndexTypeUint8FeaturesEXT[ndx].pNext = DE_NULL;
1878
1879		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1880		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1881		extFeatures.pNext = &deviceIndexTypeUint8FeaturesEXT[ndx];
1882
1883		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1884	}
1885
1886	if (isIndexTypeUint8FeaturesEXT)
1887		log << TestLog::Message << deviceIndexTypeUint8FeaturesEXT[0] << TestLog::EndMessage;
1888
1889	if (isIndexTypeUint8FeaturesEXT &&
1890		(deviceIndexTypeUint8FeaturesEXT[0].indexTypeUint8 != deviceIndexTypeUint8FeaturesEXT[1].indexTypeUint8))
1891	{
1892		TCU_FAIL("Mismatch between VkPhysicalDeviceIndexTypeUint8FeaturesEXT");
1893	}
1894	return tcu::TestStatus::pass("Querying succeeded");
1895}
1896
1897tcu::TestStatus testPhysicalDeviceFeatureFragmentShaderInterlockFeaturesEXT (Context& context)
1898{
1899	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1900	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1901	const InstanceDriver&		vki				(instance.getDriver());
1902	const int					count			= 2u;
1903	TestLog&					log				= context.getTestContext().getLog();
1904	VkPhysicalDeviceFeatures2	extFeatures;
1905	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1906
1907	VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT	deviceFragmentShaderInterlockFeaturesEXT[count];
1908	const bool											isFragmentShaderInterlockFeaturesEXT = checkExtension(properties, "VK_EXT_fragment_shader_interlock");
1909
1910	for (int ndx = 0; ndx < count; ++ndx)
1911	{
1912		deMemset(&deviceFragmentShaderInterlockFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT));
1913		deviceFragmentShaderInterlockFeaturesEXT[ndx].sType = isFragmentShaderInterlockFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1914		deviceFragmentShaderInterlockFeaturesEXT[ndx].pNext = DE_NULL;
1915
1916		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1917		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1918		extFeatures.pNext = &deviceFragmentShaderInterlockFeaturesEXT[ndx];
1919
1920		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1921	}
1922
1923	if (isFragmentShaderInterlockFeaturesEXT)
1924		log << TestLog::Message << deviceFragmentShaderInterlockFeaturesEXT[0] << TestLog::EndMessage;
1925
1926	if (isFragmentShaderInterlockFeaturesEXT &&
1927		(deviceFragmentShaderInterlockFeaturesEXT[0].fragmentShaderSampleInterlock != deviceFragmentShaderInterlockFeaturesEXT[1].fragmentShaderSampleInterlock ||
1928		 deviceFragmentShaderInterlockFeaturesEXT[0].fragmentShaderPixelInterlock != deviceFragmentShaderInterlockFeaturesEXT[1].fragmentShaderPixelInterlock ||
1929		 deviceFragmentShaderInterlockFeaturesEXT[0].fragmentShaderShadingRateInterlock != deviceFragmentShaderInterlockFeaturesEXT[1].fragmentShaderShadingRateInterlock))
1930	{
1931		TCU_FAIL("Mismatch between VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT");
1932	}
1933	return tcu::TestStatus::pass("Querying succeeded");
1934}
1935
1936tcu::TestStatus testPhysicalDeviceFeatureSeparateDepthStencilLayoutsFeatures (Context& context)
1937{
1938	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1939	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1940	const InstanceDriver&		vki				(instance.getDriver());
1941	const int					count			= 2u;
1942	TestLog&					log				= context.getTestContext().getLog();
1943	VkPhysicalDeviceFeatures2	extFeatures;
1944	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1945
1946	VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures	deviceSeparateDepthStencilLayoutsFeatures[count];
1947	const bool											isSeparateDepthStencilLayoutsFeatures = checkExtension(properties, "VK_KHR_separate_depth_stencil_layouts") || context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
1948
1949	for (int ndx = 0; ndx < count; ++ndx)
1950	{
1951		deMemset(&deviceSeparateDepthStencilLayoutsFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures));
1952		deviceSeparateDepthStencilLayoutsFeatures[ndx].sType = isSeparateDepthStencilLayoutsFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
1953		deviceSeparateDepthStencilLayoutsFeatures[ndx].pNext = DE_NULL;
1954
1955		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1956		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1957		extFeatures.pNext = &deviceSeparateDepthStencilLayoutsFeatures[ndx];
1958
1959		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1960	}
1961
1962	if (isSeparateDepthStencilLayoutsFeatures)
1963		log << TestLog::Message << deviceSeparateDepthStencilLayoutsFeatures[0] << TestLog::EndMessage;
1964
1965	if (isSeparateDepthStencilLayoutsFeatures &&
1966		(deviceSeparateDepthStencilLayoutsFeatures[0].separateDepthStencilLayouts != deviceSeparateDepthStencilLayoutsFeatures[1].separateDepthStencilLayouts))
1967	{
1968		TCU_FAIL("Mismatch between VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures");
1969	}
1970	return tcu::TestStatus::pass("Querying succeeded");
1971}
1972
1973tcu::TestStatus testPhysicalDeviceFeaturePrimitiveTopologyListRestartFeaturesEXT (Context& context)
1974{
1975	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
1976	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
1977	const InstanceDriver&		vki				(instance.getDriver());
1978	const int					count			= 2u;
1979	TestLog&					log				= context.getTestContext().getLog();
1980	VkPhysicalDeviceFeatures2	extFeatures;
1981	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
1982
1983	VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT	devicePrimitiveTopologyListRestartFeaturesEXT[count];
1984	const bool												isPrimitiveTopologyListRestartFeaturesEXT = checkExtension(properties, "VK_EXT_primitive_topology_list_restart");
1985
1986	for (int ndx = 0; ndx < count; ++ndx)
1987	{
1988		deMemset(&devicePrimitiveTopologyListRestartFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT));
1989		devicePrimitiveTopologyListRestartFeaturesEXT[ndx].sType = isPrimitiveTopologyListRestartFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
1990		devicePrimitiveTopologyListRestartFeaturesEXT[ndx].pNext = DE_NULL;
1991
1992		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
1993		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
1994		extFeatures.pNext = &devicePrimitiveTopologyListRestartFeaturesEXT[ndx];
1995
1996		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
1997	}
1998
1999	if (isPrimitiveTopologyListRestartFeaturesEXT)
2000		log << TestLog::Message << devicePrimitiveTopologyListRestartFeaturesEXT[0] << TestLog::EndMessage;
2001
2002	if (isPrimitiveTopologyListRestartFeaturesEXT &&
2003		(devicePrimitiveTopologyListRestartFeaturesEXT[0].primitiveTopologyListRestart != devicePrimitiveTopologyListRestartFeaturesEXT[1].primitiveTopologyListRestart ||
2004		 devicePrimitiveTopologyListRestartFeaturesEXT[0].primitiveTopologyPatchListRestart != devicePrimitiveTopologyListRestartFeaturesEXT[1].primitiveTopologyPatchListRestart))
2005	{
2006		TCU_FAIL("Mismatch between VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT");
2007	}
2008	return tcu::TestStatus::pass("Querying succeeded");
2009}
2010
2011tcu::TestStatus testPhysicalDeviceFeaturePipelineExecutablePropertiesFeaturesKHR (Context& context)
2012{
2013	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2014	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2015	const InstanceDriver&		vki				(instance.getDriver());
2016	const int					count			= 2u;
2017	TestLog&					log				= context.getTestContext().getLog();
2018	VkPhysicalDeviceFeatures2	extFeatures;
2019	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2020
2021	VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR	devicePipelineExecutablePropertiesFeaturesKHR[count];
2022	const bool												isPipelineExecutablePropertiesFeaturesKHR = checkExtension(properties, "VK_KHR_pipeline_executable_properties");
2023
2024	for (int ndx = 0; ndx < count; ++ndx)
2025	{
2026		deMemset(&devicePipelineExecutablePropertiesFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR));
2027		devicePipelineExecutablePropertiesFeaturesKHR[ndx].sType = isPipelineExecutablePropertiesFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
2028		devicePipelineExecutablePropertiesFeaturesKHR[ndx].pNext = DE_NULL;
2029
2030		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2031		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2032		extFeatures.pNext = &devicePipelineExecutablePropertiesFeaturesKHR[ndx];
2033
2034		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2035	}
2036
2037	if (isPipelineExecutablePropertiesFeaturesKHR)
2038		log << TestLog::Message << devicePipelineExecutablePropertiesFeaturesKHR[0] << TestLog::EndMessage;
2039
2040	if (isPipelineExecutablePropertiesFeaturesKHR &&
2041		(devicePipelineExecutablePropertiesFeaturesKHR[0].pipelineExecutableInfo != devicePipelineExecutablePropertiesFeaturesKHR[1].pipelineExecutableInfo))
2042	{
2043		TCU_FAIL("Mismatch between VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR");
2044	}
2045	return tcu::TestStatus::pass("Querying succeeded");
2046}
2047
2048tcu::TestStatus testPhysicalDeviceFeatureShaderDemoteToHelperInvocationFeatures (Context& context)
2049{
2050	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2051	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2052	const InstanceDriver&		vki				(instance.getDriver());
2053	const int					count			= 2u;
2054	TestLog&					log				= context.getTestContext().getLog();
2055	VkPhysicalDeviceFeatures2	extFeatures;
2056	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2057
2058	VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures	deviceShaderDemoteToHelperInvocationFeatures[count];
2059	const bool												isShaderDemoteToHelperInvocationFeatures = checkExtension(properties, "VK_EXT_shader_demote_to_helper_invocation") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2060
2061	for (int ndx = 0; ndx < count; ++ndx)
2062	{
2063		deMemset(&deviceShaderDemoteToHelperInvocationFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures));
2064		deviceShaderDemoteToHelperInvocationFeatures[ndx].sType = isShaderDemoteToHelperInvocationFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2065		deviceShaderDemoteToHelperInvocationFeatures[ndx].pNext = DE_NULL;
2066
2067		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2068		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2069		extFeatures.pNext = &deviceShaderDemoteToHelperInvocationFeatures[ndx];
2070
2071		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2072	}
2073
2074	if (isShaderDemoteToHelperInvocationFeatures)
2075		log << TestLog::Message << deviceShaderDemoteToHelperInvocationFeatures[0] << TestLog::EndMessage;
2076
2077	if (isShaderDemoteToHelperInvocationFeatures &&
2078		(deviceShaderDemoteToHelperInvocationFeatures[0].shaderDemoteToHelperInvocation != deviceShaderDemoteToHelperInvocationFeatures[1].shaderDemoteToHelperInvocation))
2079	{
2080		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures");
2081	}
2082	return tcu::TestStatus::pass("Querying succeeded");
2083}
2084
2085tcu::TestStatus testPhysicalDeviceFeatureTexelBufferAlignmentFeaturesEXT (Context& context)
2086{
2087	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2088	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2089	const InstanceDriver&		vki				(instance.getDriver());
2090	const int					count			= 2u;
2091	TestLog&					log				= context.getTestContext().getLog();
2092	VkPhysicalDeviceFeatures2	extFeatures;
2093	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2094
2095	VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT	deviceTexelBufferAlignmentFeaturesEXT[count];
2096	const bool										isTexelBufferAlignmentFeaturesEXT = checkExtension(properties, "VK_EXT_texel_buffer_alignment");
2097
2098	for (int ndx = 0; ndx < count; ++ndx)
2099	{
2100		deMemset(&deviceTexelBufferAlignmentFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT));
2101		deviceTexelBufferAlignmentFeaturesEXT[ndx].sType = isTexelBufferAlignmentFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2102		deviceTexelBufferAlignmentFeaturesEXT[ndx].pNext = DE_NULL;
2103
2104		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2105		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2106		extFeatures.pNext = &deviceTexelBufferAlignmentFeaturesEXT[ndx];
2107
2108		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2109	}
2110
2111	if (isTexelBufferAlignmentFeaturesEXT)
2112		log << TestLog::Message << deviceTexelBufferAlignmentFeaturesEXT[0] << TestLog::EndMessage;
2113
2114	if (isTexelBufferAlignmentFeaturesEXT &&
2115		(deviceTexelBufferAlignmentFeaturesEXT[0].texelBufferAlignment != deviceTexelBufferAlignmentFeaturesEXT[1].texelBufferAlignment))
2116	{
2117		TCU_FAIL("Mismatch between VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT");
2118	}
2119	return tcu::TestStatus::pass("Querying succeeded");
2120}
2121
2122tcu::TestStatus testPhysicalDeviceFeatureSubgroupSizeControlFeatures (Context& context)
2123{
2124	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2125	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2126	const InstanceDriver&		vki				(instance.getDriver());
2127	const int					count			= 2u;
2128	TestLog&					log				= context.getTestContext().getLog();
2129	VkPhysicalDeviceFeatures2	extFeatures;
2130	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2131
2132	VkPhysicalDeviceSubgroupSizeControlFeatures	deviceSubgroupSizeControlFeatures[count];
2133	const bool									isSubgroupSizeControlFeatures = checkExtension(properties, "VK_EXT_subgroup_size_control") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2134
2135	for (int ndx = 0; ndx < count; ++ndx)
2136	{
2137		deMemset(&deviceSubgroupSizeControlFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures));
2138		deviceSubgroupSizeControlFeatures[ndx].sType = isSubgroupSizeControlFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2139		deviceSubgroupSizeControlFeatures[ndx].pNext = DE_NULL;
2140
2141		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2142		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2143		extFeatures.pNext = &deviceSubgroupSizeControlFeatures[ndx];
2144
2145		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2146	}
2147
2148	if (isSubgroupSizeControlFeatures)
2149		log << TestLog::Message << deviceSubgroupSizeControlFeatures[0] << TestLog::EndMessage;
2150
2151	if (isSubgroupSizeControlFeatures &&
2152		(deviceSubgroupSizeControlFeatures[0].subgroupSizeControl != deviceSubgroupSizeControlFeatures[1].subgroupSizeControl ||
2153		 deviceSubgroupSizeControlFeatures[0].computeFullSubgroups != deviceSubgroupSizeControlFeatures[1].computeFullSubgroups))
2154	{
2155		TCU_FAIL("Mismatch between VkPhysicalDeviceSubgroupSizeControlFeatures");
2156	}
2157	return tcu::TestStatus::pass("Querying succeeded");
2158}
2159
2160tcu::TestStatus testPhysicalDeviceFeatureLineRasterizationFeaturesEXT (Context& context)
2161{
2162	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2163	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2164	const InstanceDriver&		vki				(instance.getDriver());
2165	const int					count			= 2u;
2166	TestLog&					log				= context.getTestContext().getLog();
2167	VkPhysicalDeviceFeatures2	extFeatures;
2168	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2169
2170	VkPhysicalDeviceLineRasterizationFeaturesEXT	deviceLineRasterizationFeaturesEXT[count];
2171	const bool										isLineRasterizationFeaturesEXT = checkExtension(properties, "VK_EXT_line_rasterization");
2172
2173	for (int ndx = 0; ndx < count; ++ndx)
2174	{
2175		deMemset(&deviceLineRasterizationFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceLineRasterizationFeaturesEXT));
2176		deviceLineRasterizationFeaturesEXT[ndx].sType = isLineRasterizationFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2177		deviceLineRasterizationFeaturesEXT[ndx].pNext = DE_NULL;
2178
2179		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2180		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2181		extFeatures.pNext = &deviceLineRasterizationFeaturesEXT[ndx];
2182
2183		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2184	}
2185
2186	if (isLineRasterizationFeaturesEXT)
2187		log << TestLog::Message << deviceLineRasterizationFeaturesEXT[0] << TestLog::EndMessage;
2188
2189	if (isLineRasterizationFeaturesEXT &&
2190		(deviceLineRasterizationFeaturesEXT[0].rectangularLines != deviceLineRasterizationFeaturesEXT[1].rectangularLines ||
2191		 deviceLineRasterizationFeaturesEXT[0].bresenhamLines != deviceLineRasterizationFeaturesEXT[1].bresenhamLines ||
2192		 deviceLineRasterizationFeaturesEXT[0].smoothLines != deviceLineRasterizationFeaturesEXT[1].smoothLines ||
2193		 deviceLineRasterizationFeaturesEXT[0].stippledRectangularLines != deviceLineRasterizationFeaturesEXT[1].stippledRectangularLines ||
2194		 deviceLineRasterizationFeaturesEXT[0].stippledBresenhamLines != deviceLineRasterizationFeaturesEXT[1].stippledBresenhamLines ||
2195		 deviceLineRasterizationFeaturesEXT[0].stippledSmoothLines != deviceLineRasterizationFeaturesEXT[1].stippledSmoothLines))
2196	{
2197		TCU_FAIL("Mismatch between VkPhysicalDeviceLineRasterizationFeaturesEXT");
2198	}
2199	return tcu::TestStatus::pass("Querying succeeded");
2200}
2201
2202tcu::TestStatus testPhysicalDeviceFeaturePipelineCreationCacheControlFeatures (Context& context)
2203{
2204	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2205	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2206	const InstanceDriver&		vki				(instance.getDriver());
2207	const int					count			= 2u;
2208	TestLog&					log				= context.getTestContext().getLog();
2209	VkPhysicalDeviceFeatures2	extFeatures;
2210	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2211
2212	VkPhysicalDevicePipelineCreationCacheControlFeatures	devicePipelineCreationCacheControlFeatures[count];
2213	const bool												isPipelineCreationCacheControlFeatures = checkExtension(properties, "VK_EXT_pipeline_creation_cache_control") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2214
2215	for (int ndx = 0; ndx < count; ++ndx)
2216	{
2217		deMemset(&devicePipelineCreationCacheControlFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures));
2218		devicePipelineCreationCacheControlFeatures[ndx].sType = isPipelineCreationCacheControlFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2219		devicePipelineCreationCacheControlFeatures[ndx].pNext = DE_NULL;
2220
2221		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2222		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2223		extFeatures.pNext = &devicePipelineCreationCacheControlFeatures[ndx];
2224
2225		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2226	}
2227
2228	if (isPipelineCreationCacheControlFeatures)
2229		log << TestLog::Message << devicePipelineCreationCacheControlFeatures[0] << TestLog::EndMessage;
2230
2231	if (isPipelineCreationCacheControlFeatures &&
2232		(devicePipelineCreationCacheControlFeatures[0].pipelineCreationCacheControl != devicePipelineCreationCacheControlFeatures[1].pipelineCreationCacheControl))
2233	{
2234		TCU_FAIL("Mismatch between VkPhysicalDevicePipelineCreationCacheControlFeatures");
2235	}
2236	return tcu::TestStatus::pass("Querying succeeded");
2237}
2238
2239tcu::TestStatus testPhysicalDeviceFeatureVulkan11Features (Context& context)
2240{
2241	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2242	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2243	const InstanceDriver&		vki				(instance.getDriver());
2244	const int					count			= 2u;
2245	TestLog&					log				= context.getTestContext().getLog();
2246	VkPhysicalDeviceFeatures2	extFeatures;
2247	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2248
2249	VkPhysicalDeviceVulkan11Features	deviceVulkan11Features[count];
2250	const bool							isVulkan11Features = context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
2251
2252	for (int ndx = 0; ndx < count; ++ndx)
2253	{
2254		deMemset(&deviceVulkan11Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVulkan11Features));
2255		deviceVulkan11Features[ndx].sType = isVulkan11Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2256		deviceVulkan11Features[ndx].pNext = DE_NULL;
2257
2258		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2259		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2260		extFeatures.pNext = &deviceVulkan11Features[ndx];
2261
2262		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2263	}
2264
2265	if (isVulkan11Features)
2266		log << TestLog::Message << deviceVulkan11Features[0] << TestLog::EndMessage;
2267
2268	if (isVulkan11Features &&
2269		(deviceVulkan11Features[0].storageBuffer16BitAccess != deviceVulkan11Features[1].storageBuffer16BitAccess ||
2270		 deviceVulkan11Features[0].uniformAndStorageBuffer16BitAccess != deviceVulkan11Features[1].uniformAndStorageBuffer16BitAccess ||
2271		 deviceVulkan11Features[0].storagePushConstant16 != deviceVulkan11Features[1].storagePushConstant16 ||
2272		 deviceVulkan11Features[0].storageInputOutput16 != deviceVulkan11Features[1].storageInputOutput16 ||
2273		 deviceVulkan11Features[0].multiview != deviceVulkan11Features[1].multiview ||
2274		 deviceVulkan11Features[0].multiviewGeometryShader != deviceVulkan11Features[1].multiviewGeometryShader ||
2275		 deviceVulkan11Features[0].multiviewTessellationShader != deviceVulkan11Features[1].multiviewTessellationShader ||
2276		 deviceVulkan11Features[0].variablePointersStorageBuffer != deviceVulkan11Features[1].variablePointersStorageBuffer ||
2277		 deviceVulkan11Features[0].variablePointers != deviceVulkan11Features[1].variablePointers ||
2278		 deviceVulkan11Features[0].protectedMemory != deviceVulkan11Features[1].protectedMemory ||
2279		 deviceVulkan11Features[0].samplerYcbcrConversion != deviceVulkan11Features[1].samplerYcbcrConversion ||
2280		 deviceVulkan11Features[0].shaderDrawParameters != deviceVulkan11Features[1].shaderDrawParameters))
2281	{
2282		TCU_FAIL("Mismatch between VkPhysicalDeviceVulkan11Features");
2283	}
2284	return tcu::TestStatus::pass("Querying succeeded");
2285}
2286
2287tcu::TestStatus testPhysicalDeviceFeatureVulkan12Features (Context& context)
2288{
2289	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2290	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2291	const InstanceDriver&		vki				(instance.getDriver());
2292	const int					count			= 2u;
2293	TestLog&					log				= context.getTestContext().getLog();
2294	VkPhysicalDeviceFeatures2	extFeatures;
2295	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2296
2297	VkPhysicalDeviceVulkan12Features	deviceVulkan12Features[count];
2298	const bool							isVulkan12Features = context.contextSupports(vk::ApiVersion(0, 1, 2, 0));
2299
2300	for (int ndx = 0; ndx < count; ++ndx)
2301	{
2302		deMemset(&deviceVulkan12Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVulkan12Features));
2303		deviceVulkan12Features[ndx].sType = isVulkan12Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2304		deviceVulkan12Features[ndx].pNext = DE_NULL;
2305
2306		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2307		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2308		extFeatures.pNext = &deviceVulkan12Features[ndx];
2309
2310		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2311	}
2312
2313	if (isVulkan12Features)
2314		log << TestLog::Message << deviceVulkan12Features[0] << TestLog::EndMessage;
2315
2316	if (isVulkan12Features &&
2317		(deviceVulkan12Features[0].samplerMirrorClampToEdge != deviceVulkan12Features[1].samplerMirrorClampToEdge ||
2318		 deviceVulkan12Features[0].drawIndirectCount != deviceVulkan12Features[1].drawIndirectCount ||
2319		 deviceVulkan12Features[0].storageBuffer8BitAccess != deviceVulkan12Features[1].storageBuffer8BitAccess ||
2320		 deviceVulkan12Features[0].uniformAndStorageBuffer8BitAccess != deviceVulkan12Features[1].uniformAndStorageBuffer8BitAccess ||
2321		 deviceVulkan12Features[0].storagePushConstant8 != deviceVulkan12Features[1].storagePushConstant8 ||
2322		 deviceVulkan12Features[0].shaderBufferInt64Atomics != deviceVulkan12Features[1].shaderBufferInt64Atomics ||
2323		 deviceVulkan12Features[0].shaderSharedInt64Atomics != deviceVulkan12Features[1].shaderSharedInt64Atomics ||
2324		 deviceVulkan12Features[0].shaderFloat16 != deviceVulkan12Features[1].shaderFloat16 ||
2325		 deviceVulkan12Features[0].shaderInt8 != deviceVulkan12Features[1].shaderInt8 ||
2326		 deviceVulkan12Features[0].descriptorIndexing != deviceVulkan12Features[1].descriptorIndexing ||
2327		 deviceVulkan12Features[0].shaderInputAttachmentArrayDynamicIndexing != deviceVulkan12Features[1].shaderInputAttachmentArrayDynamicIndexing ||
2328		 deviceVulkan12Features[0].shaderUniformTexelBufferArrayDynamicIndexing != deviceVulkan12Features[1].shaderUniformTexelBufferArrayDynamicIndexing ||
2329		 deviceVulkan12Features[0].shaderStorageTexelBufferArrayDynamicIndexing != deviceVulkan12Features[1].shaderStorageTexelBufferArrayDynamicIndexing ||
2330		 deviceVulkan12Features[0].shaderUniformBufferArrayNonUniformIndexing != deviceVulkan12Features[1].shaderUniformBufferArrayNonUniformIndexing ||
2331		 deviceVulkan12Features[0].shaderSampledImageArrayNonUniformIndexing != deviceVulkan12Features[1].shaderSampledImageArrayNonUniformIndexing ||
2332		 deviceVulkan12Features[0].shaderStorageBufferArrayNonUniformIndexing != deviceVulkan12Features[1].shaderStorageBufferArrayNonUniformIndexing ||
2333		 deviceVulkan12Features[0].shaderStorageImageArrayNonUniformIndexing != deviceVulkan12Features[1].shaderStorageImageArrayNonUniformIndexing ||
2334		 deviceVulkan12Features[0].shaderInputAttachmentArrayNonUniformIndexing != deviceVulkan12Features[1].shaderInputAttachmentArrayNonUniformIndexing ||
2335		 deviceVulkan12Features[0].shaderUniformTexelBufferArrayNonUniformIndexing != deviceVulkan12Features[1].shaderUniformTexelBufferArrayNonUniformIndexing ||
2336		 deviceVulkan12Features[0].shaderStorageTexelBufferArrayNonUniformIndexing != deviceVulkan12Features[1].shaderStorageTexelBufferArrayNonUniformIndexing ||
2337		 deviceVulkan12Features[0].descriptorBindingUniformBufferUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingUniformBufferUpdateAfterBind ||
2338		 deviceVulkan12Features[0].descriptorBindingSampledImageUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingSampledImageUpdateAfterBind ||
2339		 deviceVulkan12Features[0].descriptorBindingStorageImageUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingStorageImageUpdateAfterBind ||
2340		 deviceVulkan12Features[0].descriptorBindingStorageBufferUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingStorageBufferUpdateAfterBind ||
2341		 deviceVulkan12Features[0].descriptorBindingUniformTexelBufferUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingUniformTexelBufferUpdateAfterBind ||
2342		 deviceVulkan12Features[0].descriptorBindingStorageTexelBufferUpdateAfterBind != deviceVulkan12Features[1].descriptorBindingStorageTexelBufferUpdateAfterBind ||
2343		 deviceVulkan12Features[0].descriptorBindingUpdateUnusedWhilePending != deviceVulkan12Features[1].descriptorBindingUpdateUnusedWhilePending ||
2344		 deviceVulkan12Features[0].descriptorBindingPartiallyBound != deviceVulkan12Features[1].descriptorBindingPartiallyBound ||
2345		 deviceVulkan12Features[0].descriptorBindingVariableDescriptorCount != deviceVulkan12Features[1].descriptorBindingVariableDescriptorCount ||
2346		 deviceVulkan12Features[0].runtimeDescriptorArray != deviceVulkan12Features[1].runtimeDescriptorArray ||
2347		 deviceVulkan12Features[0].samplerFilterMinmax != deviceVulkan12Features[1].samplerFilterMinmax ||
2348		 deviceVulkan12Features[0].scalarBlockLayout != deviceVulkan12Features[1].scalarBlockLayout ||
2349		 deviceVulkan12Features[0].imagelessFramebuffer != deviceVulkan12Features[1].imagelessFramebuffer ||
2350		 deviceVulkan12Features[0].uniformBufferStandardLayout != deviceVulkan12Features[1].uniformBufferStandardLayout ||
2351		 deviceVulkan12Features[0].shaderSubgroupExtendedTypes != deviceVulkan12Features[1].shaderSubgroupExtendedTypes ||
2352		 deviceVulkan12Features[0].separateDepthStencilLayouts != deviceVulkan12Features[1].separateDepthStencilLayouts ||
2353		 deviceVulkan12Features[0].hostQueryReset != deviceVulkan12Features[1].hostQueryReset ||
2354		 deviceVulkan12Features[0].timelineSemaphore != deviceVulkan12Features[1].timelineSemaphore ||
2355		 deviceVulkan12Features[0].bufferDeviceAddress != deviceVulkan12Features[1].bufferDeviceAddress ||
2356		 deviceVulkan12Features[0].bufferDeviceAddressCaptureReplay != deviceVulkan12Features[1].bufferDeviceAddressCaptureReplay ||
2357		 deviceVulkan12Features[0].bufferDeviceAddressMultiDevice != deviceVulkan12Features[1].bufferDeviceAddressMultiDevice ||
2358		 deviceVulkan12Features[0].vulkanMemoryModel != deviceVulkan12Features[1].vulkanMemoryModel ||
2359		 deviceVulkan12Features[0].vulkanMemoryModelDeviceScope != deviceVulkan12Features[1].vulkanMemoryModelDeviceScope ||
2360		 deviceVulkan12Features[0].vulkanMemoryModelAvailabilityVisibilityChains != deviceVulkan12Features[1].vulkanMemoryModelAvailabilityVisibilityChains ||
2361		 deviceVulkan12Features[0].shaderOutputViewportIndex != deviceVulkan12Features[1].shaderOutputViewportIndex ||
2362		 deviceVulkan12Features[0].shaderOutputLayer != deviceVulkan12Features[1].shaderOutputLayer ||
2363		 deviceVulkan12Features[0].subgroupBroadcastDynamicId != deviceVulkan12Features[1].subgroupBroadcastDynamicId))
2364	{
2365		TCU_FAIL("Mismatch between VkPhysicalDeviceVulkan12Features");
2366	}
2367	return tcu::TestStatus::pass("Querying succeeded");
2368}
2369
2370tcu::TestStatus testPhysicalDeviceFeatureVulkan13Features (Context& context)
2371{
2372	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2373	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2374	const InstanceDriver&		vki				(instance.getDriver());
2375	const int					count			= 2u;
2376	TestLog&					log				= context.getTestContext().getLog();
2377	VkPhysicalDeviceFeatures2	extFeatures;
2378	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2379
2380	VkPhysicalDeviceVulkan13Features	deviceVulkan13Features[count];
2381	const bool							isVulkan13Features = context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2382
2383	for (int ndx = 0; ndx < count; ++ndx)
2384	{
2385		deMemset(&deviceVulkan13Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVulkan13Features));
2386		deviceVulkan13Features[ndx].sType = isVulkan13Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2387		deviceVulkan13Features[ndx].pNext = DE_NULL;
2388
2389		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2390		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2391		extFeatures.pNext = &deviceVulkan13Features[ndx];
2392
2393		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2394	}
2395
2396	if (isVulkan13Features)
2397		log << TestLog::Message << deviceVulkan13Features[0] << TestLog::EndMessage;
2398
2399	if (isVulkan13Features &&
2400		(deviceVulkan13Features[0].robustImageAccess != deviceVulkan13Features[1].robustImageAccess ||
2401		 deviceVulkan13Features[0].inlineUniformBlock != deviceVulkan13Features[1].inlineUniformBlock ||
2402		 deviceVulkan13Features[0].descriptorBindingInlineUniformBlockUpdateAfterBind != deviceVulkan13Features[1].descriptorBindingInlineUniformBlockUpdateAfterBind ||
2403		 deviceVulkan13Features[0].pipelineCreationCacheControl != deviceVulkan13Features[1].pipelineCreationCacheControl ||
2404		 deviceVulkan13Features[0].privateData != deviceVulkan13Features[1].privateData ||
2405		 deviceVulkan13Features[0].shaderDemoteToHelperInvocation != deviceVulkan13Features[1].shaderDemoteToHelperInvocation ||
2406		 deviceVulkan13Features[0].shaderTerminateInvocation != deviceVulkan13Features[1].shaderTerminateInvocation ||
2407		 deviceVulkan13Features[0].subgroupSizeControl != deviceVulkan13Features[1].subgroupSizeControl ||
2408		 deviceVulkan13Features[0].computeFullSubgroups != deviceVulkan13Features[1].computeFullSubgroups ||
2409		 deviceVulkan13Features[0].synchronization2 != deviceVulkan13Features[1].synchronization2 ||
2410		 deviceVulkan13Features[0].textureCompressionASTC_HDR != deviceVulkan13Features[1].textureCompressionASTC_HDR ||
2411		 deviceVulkan13Features[0].shaderZeroInitializeWorkgroupMemory != deviceVulkan13Features[1].shaderZeroInitializeWorkgroupMemory ||
2412		 deviceVulkan13Features[0].dynamicRendering != deviceVulkan13Features[1].dynamicRendering ||
2413		 deviceVulkan13Features[0].shaderIntegerDotProduct != deviceVulkan13Features[1].shaderIntegerDotProduct ||
2414		 deviceVulkan13Features[0].maintenance4 != deviceVulkan13Features[1].maintenance4))
2415	{
2416		TCU_FAIL("Mismatch between VkPhysicalDeviceVulkan13Features");
2417	}
2418	return tcu::TestStatus::pass("Querying succeeded");
2419}
2420
2421tcu::TestStatus testPhysicalDeviceFeatureCustomBorderColorFeaturesEXT (Context& context)
2422{
2423	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2424	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2425	const InstanceDriver&		vki				(instance.getDriver());
2426	const int					count			= 2u;
2427	TestLog&					log				= context.getTestContext().getLog();
2428	VkPhysicalDeviceFeatures2	extFeatures;
2429	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2430
2431	VkPhysicalDeviceCustomBorderColorFeaturesEXT	deviceCustomBorderColorFeaturesEXT[count];
2432	const bool										isCustomBorderColorFeaturesEXT = checkExtension(properties, "VK_EXT_custom_border_color");
2433
2434	for (int ndx = 0; ndx < count; ++ndx)
2435	{
2436		deMemset(&deviceCustomBorderColorFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT));
2437		deviceCustomBorderColorFeaturesEXT[ndx].sType = isCustomBorderColorFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2438		deviceCustomBorderColorFeaturesEXT[ndx].pNext = DE_NULL;
2439
2440		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2441		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2442		extFeatures.pNext = &deviceCustomBorderColorFeaturesEXT[ndx];
2443
2444		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2445	}
2446
2447	if (isCustomBorderColorFeaturesEXT)
2448		log << TestLog::Message << deviceCustomBorderColorFeaturesEXT[0] << TestLog::EndMessage;
2449
2450	if (isCustomBorderColorFeaturesEXT &&
2451		(deviceCustomBorderColorFeaturesEXT[0].customBorderColors != deviceCustomBorderColorFeaturesEXT[1].customBorderColors ||
2452		 deviceCustomBorderColorFeaturesEXT[0].customBorderColorWithoutFormat != deviceCustomBorderColorFeaturesEXT[1].customBorderColorWithoutFormat))
2453	{
2454		TCU_FAIL("Mismatch between VkPhysicalDeviceCustomBorderColorFeaturesEXT");
2455	}
2456	return tcu::TestStatus::pass("Querying succeeded");
2457}
2458
2459tcu::TestStatus testPhysicalDeviceFeatureBorderColorSwizzleFeaturesEXT (Context& context)
2460{
2461	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2462	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2463	const InstanceDriver&		vki				(instance.getDriver());
2464	const int					count			= 2u;
2465	TestLog&					log				= context.getTestContext().getLog();
2466	VkPhysicalDeviceFeatures2	extFeatures;
2467	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2468
2469	VkPhysicalDeviceBorderColorSwizzleFeaturesEXT	deviceBorderColorSwizzleFeaturesEXT[count];
2470	const bool										isBorderColorSwizzleFeaturesEXT = checkExtension(properties, "VK_EXT_border_color_swizzle");
2471
2472	for (int ndx = 0; ndx < count; ++ndx)
2473	{
2474		deMemset(&deviceBorderColorSwizzleFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT));
2475		deviceBorderColorSwizzleFeaturesEXT[ndx].sType = isBorderColorSwizzleFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2476		deviceBorderColorSwizzleFeaturesEXT[ndx].pNext = DE_NULL;
2477
2478		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2479		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2480		extFeatures.pNext = &deviceBorderColorSwizzleFeaturesEXT[ndx];
2481
2482		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2483	}
2484
2485	if (isBorderColorSwizzleFeaturesEXT)
2486		log << TestLog::Message << deviceBorderColorSwizzleFeaturesEXT[0] << TestLog::EndMessage;
2487
2488	if (isBorderColorSwizzleFeaturesEXT &&
2489		(deviceBorderColorSwizzleFeaturesEXT[0].borderColorSwizzle != deviceBorderColorSwizzleFeaturesEXT[1].borderColorSwizzle ||
2490		 deviceBorderColorSwizzleFeaturesEXT[0].borderColorSwizzleFromImage != deviceBorderColorSwizzleFeaturesEXT[1].borderColorSwizzleFromImage))
2491	{
2492		TCU_FAIL("Mismatch between VkPhysicalDeviceBorderColorSwizzleFeaturesEXT");
2493	}
2494	return tcu::TestStatus::pass("Querying succeeded");
2495}
2496
2497tcu::TestStatus testPhysicalDeviceFeatureExtendedDynamicStateFeaturesEXT (Context& context)
2498{
2499	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2500	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2501	const InstanceDriver&		vki				(instance.getDriver());
2502	const int					count			= 2u;
2503	TestLog&					log				= context.getTestContext().getLog();
2504	VkPhysicalDeviceFeatures2	extFeatures;
2505	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2506
2507	VkPhysicalDeviceExtendedDynamicStateFeaturesEXT	deviceExtendedDynamicStateFeaturesEXT[count];
2508	const bool										isExtendedDynamicStateFeaturesEXT = checkExtension(properties, "VK_EXT_extended_dynamic_state");
2509
2510	for (int ndx = 0; ndx < count; ++ndx)
2511	{
2512		deMemset(&deviceExtendedDynamicStateFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT));
2513		deviceExtendedDynamicStateFeaturesEXT[ndx].sType = isExtendedDynamicStateFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2514		deviceExtendedDynamicStateFeaturesEXT[ndx].pNext = DE_NULL;
2515
2516		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2517		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2518		extFeatures.pNext = &deviceExtendedDynamicStateFeaturesEXT[ndx];
2519
2520		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2521	}
2522
2523	if (isExtendedDynamicStateFeaturesEXT)
2524		log << TestLog::Message << deviceExtendedDynamicStateFeaturesEXT[0] << TestLog::EndMessage;
2525
2526	if (isExtendedDynamicStateFeaturesEXT &&
2527		(deviceExtendedDynamicStateFeaturesEXT[0].extendedDynamicState != deviceExtendedDynamicStateFeaturesEXT[1].extendedDynamicState))
2528	{
2529		TCU_FAIL("Mismatch between VkPhysicalDeviceExtendedDynamicStateFeaturesEXT");
2530	}
2531	return tcu::TestStatus::pass("Querying succeeded");
2532}
2533
2534tcu::TestStatus testPhysicalDeviceFeatureExtendedDynamicState2FeaturesEXT (Context& context)
2535{
2536	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2537	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2538	const InstanceDriver&		vki				(instance.getDriver());
2539	const int					count			= 2u;
2540	TestLog&					log				= context.getTestContext().getLog();
2541	VkPhysicalDeviceFeatures2	extFeatures;
2542	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2543
2544	VkPhysicalDeviceExtendedDynamicState2FeaturesEXT	deviceExtendedDynamicState2FeaturesEXT[count];
2545	const bool											isExtendedDynamicState2FeaturesEXT = checkExtension(properties, "VK_EXT_extended_dynamic_state2");
2546
2547	for (int ndx = 0; ndx < count; ++ndx)
2548	{
2549		deMemset(&deviceExtendedDynamicState2FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT));
2550		deviceExtendedDynamicState2FeaturesEXT[ndx].sType = isExtendedDynamicState2FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2551		deviceExtendedDynamicState2FeaturesEXT[ndx].pNext = DE_NULL;
2552
2553		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2554		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2555		extFeatures.pNext = &deviceExtendedDynamicState2FeaturesEXT[ndx];
2556
2557		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2558	}
2559
2560	if (isExtendedDynamicState2FeaturesEXT)
2561		log << TestLog::Message << deviceExtendedDynamicState2FeaturesEXT[0] << TestLog::EndMessage;
2562
2563	if (isExtendedDynamicState2FeaturesEXT &&
2564		(deviceExtendedDynamicState2FeaturesEXT[0].extendedDynamicState2 != deviceExtendedDynamicState2FeaturesEXT[1].extendedDynamicState2 ||
2565		 deviceExtendedDynamicState2FeaturesEXT[0].extendedDynamicState2LogicOp != deviceExtendedDynamicState2FeaturesEXT[1].extendedDynamicState2LogicOp ||
2566		 deviceExtendedDynamicState2FeaturesEXT[0].extendedDynamicState2PatchControlPoints != deviceExtendedDynamicState2FeaturesEXT[1].extendedDynamicState2PatchControlPoints))
2567	{
2568		TCU_FAIL("Mismatch between VkPhysicalDeviceExtendedDynamicState2FeaturesEXT");
2569	}
2570	return tcu::TestStatus::pass("Querying succeeded");
2571}
2572
2573tcu::TestStatus testPhysicalDeviceFeatureExtendedDynamicState3FeaturesEXT (Context& context)
2574{
2575	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2576	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2577	const InstanceDriver&		vki				(instance.getDriver());
2578	const int					count			= 2u;
2579	TestLog&					log				= context.getTestContext().getLog();
2580	VkPhysicalDeviceFeatures2	extFeatures;
2581	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2582
2583	VkPhysicalDeviceExtendedDynamicState3FeaturesEXT	deviceExtendedDynamicState3FeaturesEXT[count];
2584	const bool											isExtendedDynamicState3FeaturesEXT = checkExtension(properties, "VK_EXT_extended_dynamic_state3");
2585
2586	for (int ndx = 0; ndx < count; ++ndx)
2587	{
2588		deMemset(&deviceExtendedDynamicState3FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT));
2589		deviceExtendedDynamicState3FeaturesEXT[ndx].sType = isExtendedDynamicState3FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2590		deviceExtendedDynamicState3FeaturesEXT[ndx].pNext = DE_NULL;
2591
2592		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2593		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2594		extFeatures.pNext = &deviceExtendedDynamicState3FeaturesEXT[ndx];
2595
2596		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2597	}
2598
2599	if (isExtendedDynamicState3FeaturesEXT)
2600		log << TestLog::Message << deviceExtendedDynamicState3FeaturesEXT[0] << TestLog::EndMessage;
2601
2602	if (isExtendedDynamicState3FeaturesEXT &&
2603		(deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3TessellationDomainOrigin != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3TessellationDomainOrigin ||
2604		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3DepthClampEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3DepthClampEnable ||
2605		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3PolygonMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3PolygonMode ||
2606		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3RasterizationSamples != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3RasterizationSamples ||
2607		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3SampleMask != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3SampleMask ||
2608		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3AlphaToCoverageEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3AlphaToCoverageEnable ||
2609		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3AlphaToOneEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3AlphaToOneEnable ||
2610		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3LogicOpEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3LogicOpEnable ||
2611		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ColorBlendEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ColorBlendEnable ||
2612		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ColorBlendEquation != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ColorBlendEquation ||
2613		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ColorWriteMask != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ColorWriteMask ||
2614		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3RasterizationStream != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3RasterizationStream ||
2615		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ConservativeRasterizationMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ConservativeRasterizationMode ||
2616		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ExtraPrimitiveOverestimationSize != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ExtraPrimitiveOverestimationSize ||
2617		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3DepthClipEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3DepthClipEnable ||
2618		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3SampleLocationsEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3SampleLocationsEnable ||
2619		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ColorBlendAdvanced != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ColorBlendAdvanced ||
2620		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ProvokingVertexMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ProvokingVertexMode ||
2621		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3LineRasterizationMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3LineRasterizationMode ||
2622		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3LineStippleEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3LineStippleEnable ||
2623		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3DepthClipNegativeOneToOne != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3DepthClipNegativeOneToOne ||
2624		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ViewportWScalingEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ViewportWScalingEnable ||
2625		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ViewportSwizzle != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ViewportSwizzle ||
2626		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageToColorEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageToColorEnable ||
2627		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageToColorLocation != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageToColorLocation ||
2628		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageModulationMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageModulationMode ||
2629		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageModulationTableEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageModulationTableEnable ||
2630		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageModulationTable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageModulationTable ||
2631		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3CoverageReductionMode != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3CoverageReductionMode ||
2632		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3RepresentativeFragmentTestEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3RepresentativeFragmentTestEnable ||
2633		 deviceExtendedDynamicState3FeaturesEXT[0].extendedDynamicState3ShadingRateImageEnable != deviceExtendedDynamicState3FeaturesEXT[1].extendedDynamicState3ShadingRateImageEnable))
2634	{
2635		TCU_FAIL("Mismatch between VkPhysicalDeviceExtendedDynamicState3FeaturesEXT");
2636	}
2637	return tcu::TestStatus::pass("Querying succeeded");
2638}
2639
2640tcu::TestStatus testPhysicalDeviceFeatureZeroInitializeWorkgroupMemoryFeatures (Context& context)
2641{
2642	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2643	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2644	const InstanceDriver&		vki				(instance.getDriver());
2645	const int					count			= 2u;
2646	TestLog&					log				= context.getTestContext().getLog();
2647	VkPhysicalDeviceFeatures2	extFeatures;
2648	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2649
2650	VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures	deviceZeroInitializeWorkgroupMemoryFeatures[count];
2651	const bool												isZeroInitializeWorkgroupMemoryFeatures = checkExtension(properties, "VK_KHR_zero_initialize_workgroup_memory") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2652
2653	for (int ndx = 0; ndx < count; ++ndx)
2654	{
2655		deMemset(&deviceZeroInitializeWorkgroupMemoryFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures));
2656		deviceZeroInitializeWorkgroupMemoryFeatures[ndx].sType = isZeroInitializeWorkgroupMemoryFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2657		deviceZeroInitializeWorkgroupMemoryFeatures[ndx].pNext = DE_NULL;
2658
2659		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2660		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2661		extFeatures.pNext = &deviceZeroInitializeWorkgroupMemoryFeatures[ndx];
2662
2663		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2664	}
2665
2666	if (isZeroInitializeWorkgroupMemoryFeatures)
2667		log << TestLog::Message << deviceZeroInitializeWorkgroupMemoryFeatures[0] << TestLog::EndMessage;
2668
2669	if (isZeroInitializeWorkgroupMemoryFeatures &&
2670		(deviceZeroInitializeWorkgroupMemoryFeatures[0].shaderZeroInitializeWorkgroupMemory != deviceZeroInitializeWorkgroupMemoryFeatures[1].shaderZeroInitializeWorkgroupMemory))
2671	{
2672		TCU_FAIL("Mismatch between VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures");
2673	}
2674	return tcu::TestStatus::pass("Querying succeeded");
2675}
2676
2677tcu::TestStatus testPhysicalDeviceFeatureShaderSubgroupUniformControlFlowFeaturesKHR (Context& context)
2678{
2679	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2680	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2681	const InstanceDriver&		vki				(instance.getDriver());
2682	const int					count			= 2u;
2683	TestLog&					log				= context.getTestContext().getLog();
2684	VkPhysicalDeviceFeatures2	extFeatures;
2685	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2686
2687	VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR	deviceShaderSubgroupUniformControlFlowFeaturesKHR[count];
2688	const bool													isShaderSubgroupUniformControlFlowFeaturesKHR = checkExtension(properties, "VK_KHR_shader_subgroup_uniform_control_flow");
2689
2690	for (int ndx = 0; ndx < count; ++ndx)
2691	{
2692		deMemset(&deviceShaderSubgroupUniformControlFlowFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR));
2693		deviceShaderSubgroupUniformControlFlowFeaturesKHR[ndx].sType = isShaderSubgroupUniformControlFlowFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
2694		deviceShaderSubgroupUniformControlFlowFeaturesKHR[ndx].pNext = DE_NULL;
2695
2696		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2697		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2698		extFeatures.pNext = &deviceShaderSubgroupUniformControlFlowFeaturesKHR[ndx];
2699
2700		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2701	}
2702
2703	if (isShaderSubgroupUniformControlFlowFeaturesKHR)
2704		log << TestLog::Message << deviceShaderSubgroupUniformControlFlowFeaturesKHR[0] << TestLog::EndMessage;
2705
2706	if (isShaderSubgroupUniformControlFlowFeaturesKHR &&
2707		(deviceShaderSubgroupUniformControlFlowFeaturesKHR[0].shaderSubgroupUniformControlFlow != deviceShaderSubgroupUniformControlFlowFeaturesKHR[1].shaderSubgroupUniformControlFlow))
2708	{
2709		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR");
2710	}
2711	return tcu::TestStatus::pass("Querying succeeded");
2712}
2713
2714tcu::TestStatus testPhysicalDeviceFeatureRobustness2FeaturesEXT (Context& context)
2715{
2716	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2717	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2718	const InstanceDriver&		vki				(instance.getDriver());
2719	const int					count			= 2u;
2720	TestLog&					log				= context.getTestContext().getLog();
2721	VkPhysicalDeviceFeatures2	extFeatures;
2722	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2723
2724	VkPhysicalDeviceRobustness2FeaturesEXT	deviceRobustness2FeaturesEXT[count];
2725	const bool								isRobustness2FeaturesEXT = checkExtension(properties, "VK_EXT_robustness2");
2726
2727	for (int ndx = 0; ndx < count; ++ndx)
2728	{
2729		deMemset(&deviceRobustness2FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRobustness2FeaturesEXT));
2730		deviceRobustness2FeaturesEXT[ndx].sType = isRobustness2FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2731		deviceRobustness2FeaturesEXT[ndx].pNext = DE_NULL;
2732
2733		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2734		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2735		extFeatures.pNext = &deviceRobustness2FeaturesEXT[ndx];
2736
2737		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2738	}
2739
2740	if (isRobustness2FeaturesEXT)
2741		log << TestLog::Message << deviceRobustness2FeaturesEXT[0] << TestLog::EndMessage;
2742
2743	if (isRobustness2FeaturesEXT &&
2744		(deviceRobustness2FeaturesEXT[0].robustBufferAccess2 != deviceRobustness2FeaturesEXT[1].robustBufferAccess2 ||
2745		 deviceRobustness2FeaturesEXT[0].robustImageAccess2 != deviceRobustness2FeaturesEXT[1].robustImageAccess2 ||
2746		 deviceRobustness2FeaturesEXT[0].nullDescriptor != deviceRobustness2FeaturesEXT[1].nullDescriptor))
2747	{
2748		TCU_FAIL("Mismatch between VkPhysicalDeviceRobustness2FeaturesEXT");
2749	}
2750	return tcu::TestStatus::pass("Querying succeeded");
2751}
2752
2753tcu::TestStatus testPhysicalDeviceFeatureImageRobustnessFeatures (Context& context)
2754{
2755	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2756	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2757	const InstanceDriver&		vki				(instance.getDriver());
2758	const int					count			= 2u;
2759	TestLog&					log				= context.getTestContext().getLog();
2760	VkPhysicalDeviceFeatures2	extFeatures;
2761	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2762
2763	VkPhysicalDeviceImageRobustnessFeatures	deviceImageRobustnessFeatures[count];
2764	const bool								isImageRobustnessFeatures = checkExtension(properties, "VK_EXT_image_robustness") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
2765
2766	for (int ndx = 0; ndx < count; ++ndx)
2767	{
2768		deMemset(&deviceImageRobustnessFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImageRobustnessFeatures));
2769		deviceImageRobustnessFeatures[ndx].sType = isImageRobustnessFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
2770		deviceImageRobustnessFeatures[ndx].pNext = DE_NULL;
2771
2772		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2773		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2774		extFeatures.pNext = &deviceImageRobustnessFeatures[ndx];
2775
2776		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2777	}
2778
2779	if (isImageRobustnessFeatures)
2780		log << TestLog::Message << deviceImageRobustnessFeatures[0] << TestLog::EndMessage;
2781
2782	if (isImageRobustnessFeatures &&
2783		(deviceImageRobustnessFeatures[0].robustImageAccess != deviceImageRobustnessFeatures[1].robustImageAccess))
2784	{
2785		TCU_FAIL("Mismatch between VkPhysicalDeviceImageRobustnessFeatures");
2786	}
2787	return tcu::TestStatus::pass("Querying succeeded");
2788}
2789
2790tcu::TestStatus testPhysicalDeviceFeatureWorkgroupMemoryExplicitLayoutFeaturesKHR (Context& context)
2791{
2792	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2793	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2794	const InstanceDriver&		vki				(instance.getDriver());
2795	const int					count			= 2u;
2796	TestLog&					log				= context.getTestContext().getLog();
2797	VkPhysicalDeviceFeatures2	extFeatures;
2798	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2799
2800	VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR	deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[count];
2801	const bool													isWorkgroupMemoryExplicitLayoutFeaturesKHR = checkExtension(properties, "VK_KHR_workgroup_memory_explicit_layout");
2802
2803	for (int ndx = 0; ndx < count; ++ndx)
2804	{
2805		deMemset(&deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR));
2806		deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[ndx].sType = isWorkgroupMemoryExplicitLayoutFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
2807		deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[ndx].pNext = DE_NULL;
2808
2809		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2810		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2811		extFeatures.pNext = &deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[ndx];
2812
2813		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2814	}
2815
2816	if (isWorkgroupMemoryExplicitLayoutFeaturesKHR)
2817		log << TestLog::Message << deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[0] << TestLog::EndMessage;
2818
2819	if (isWorkgroupMemoryExplicitLayoutFeaturesKHR &&
2820		(deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[0].workgroupMemoryExplicitLayout != deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[1].workgroupMemoryExplicitLayout ||
2821		 deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[0].workgroupMemoryExplicitLayoutScalarBlockLayout != deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[1].workgroupMemoryExplicitLayoutScalarBlockLayout ||
2822		 deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[0].workgroupMemoryExplicitLayout8BitAccess != deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[1].workgroupMemoryExplicitLayout8BitAccess ||
2823		 deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[0].workgroupMemoryExplicitLayout16BitAccess != deviceWorkgroupMemoryExplicitLayoutFeaturesKHR[1].workgroupMemoryExplicitLayout16BitAccess))
2824	{
2825		TCU_FAIL("Mismatch between VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR");
2826	}
2827	return tcu::TestStatus::pass("Querying succeeded");
2828}
2829
2830tcu::TestStatus testPhysicalDeviceFeaturePortabilitySubsetFeaturesKHR (Context& context)
2831{
2832	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2833	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2834	const InstanceDriver&		vki				(instance.getDriver());
2835	const int					count			= 2u;
2836	TestLog&					log				= context.getTestContext().getLog();
2837	VkPhysicalDeviceFeatures2	extFeatures;
2838	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2839
2840	VkPhysicalDevicePortabilitySubsetFeaturesKHR	devicePortabilitySubsetFeaturesKHR[count];
2841	const bool										isPortabilitySubsetFeaturesKHR = checkExtension(properties, "VK_KHR_portability_subset");
2842
2843	for (int ndx = 0; ndx < count; ++ndx)
2844	{
2845		deMemset(&devicePortabilitySubsetFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePortabilitySubsetFeaturesKHR));
2846		devicePortabilitySubsetFeaturesKHR[ndx].sType = isPortabilitySubsetFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
2847		devicePortabilitySubsetFeaturesKHR[ndx].pNext = DE_NULL;
2848
2849		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2850		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2851		extFeatures.pNext = &devicePortabilitySubsetFeaturesKHR[ndx];
2852
2853		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2854	}
2855
2856	if (isPortabilitySubsetFeaturesKHR)
2857		log << TestLog::Message << devicePortabilitySubsetFeaturesKHR[0] << TestLog::EndMessage;
2858
2859	if (isPortabilitySubsetFeaturesKHR &&
2860		(devicePortabilitySubsetFeaturesKHR[0].constantAlphaColorBlendFactors != devicePortabilitySubsetFeaturesKHR[1].constantAlphaColorBlendFactors ||
2861		 devicePortabilitySubsetFeaturesKHR[0].events != devicePortabilitySubsetFeaturesKHR[1].events ||
2862		 devicePortabilitySubsetFeaturesKHR[0].imageViewFormatReinterpretation != devicePortabilitySubsetFeaturesKHR[1].imageViewFormatReinterpretation ||
2863		 devicePortabilitySubsetFeaturesKHR[0].imageViewFormatSwizzle != devicePortabilitySubsetFeaturesKHR[1].imageViewFormatSwizzle ||
2864		 devicePortabilitySubsetFeaturesKHR[0].imageView2DOn3DImage != devicePortabilitySubsetFeaturesKHR[1].imageView2DOn3DImage ||
2865		 devicePortabilitySubsetFeaturesKHR[0].multisampleArrayImage != devicePortabilitySubsetFeaturesKHR[1].multisampleArrayImage ||
2866		 devicePortabilitySubsetFeaturesKHR[0].mutableComparisonSamplers != devicePortabilitySubsetFeaturesKHR[1].mutableComparisonSamplers ||
2867		 devicePortabilitySubsetFeaturesKHR[0].pointPolygons != devicePortabilitySubsetFeaturesKHR[1].pointPolygons ||
2868		 devicePortabilitySubsetFeaturesKHR[0].samplerMipLodBias != devicePortabilitySubsetFeaturesKHR[1].samplerMipLodBias ||
2869		 devicePortabilitySubsetFeaturesKHR[0].separateStencilMaskRef != devicePortabilitySubsetFeaturesKHR[1].separateStencilMaskRef ||
2870		 devicePortabilitySubsetFeaturesKHR[0].shaderSampleRateInterpolationFunctions != devicePortabilitySubsetFeaturesKHR[1].shaderSampleRateInterpolationFunctions ||
2871		 devicePortabilitySubsetFeaturesKHR[0].tessellationIsolines != devicePortabilitySubsetFeaturesKHR[1].tessellationIsolines ||
2872		 devicePortabilitySubsetFeaturesKHR[0].tessellationPointMode != devicePortabilitySubsetFeaturesKHR[1].tessellationPointMode ||
2873		 devicePortabilitySubsetFeaturesKHR[0].triangleFans != devicePortabilitySubsetFeaturesKHR[1].triangleFans ||
2874		 devicePortabilitySubsetFeaturesKHR[0].vertexAttributeAccessBeyondStride != devicePortabilitySubsetFeaturesKHR[1].vertexAttributeAccessBeyondStride))
2875	{
2876		TCU_FAIL("Mismatch between VkPhysicalDevicePortabilitySubsetFeaturesKHR");
2877	}
2878	return tcu::TestStatus::pass("Querying succeeded");
2879}
2880
2881tcu::TestStatus testPhysicalDeviceFeature4444FormatsFeaturesEXT (Context& context)
2882{
2883	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2884	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2885	const InstanceDriver&		vki				(instance.getDriver());
2886	const int					count			= 2u;
2887	TestLog&					log				= context.getTestContext().getLog();
2888	VkPhysicalDeviceFeatures2	extFeatures;
2889	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2890
2891	VkPhysicalDevice4444FormatsFeaturesEXT	device4444FormatsFeaturesEXT[count];
2892	const bool								is4444FormatsFeaturesEXT = checkExtension(properties, "VK_EXT_4444_formats");
2893
2894	for (int ndx = 0; ndx < count; ++ndx)
2895	{
2896		deMemset(&device4444FormatsFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevice4444FormatsFeaturesEXT));
2897		device4444FormatsFeaturesEXT[ndx].sType = is4444FormatsFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2898		device4444FormatsFeaturesEXT[ndx].pNext = DE_NULL;
2899
2900		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2901		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2902		extFeatures.pNext = &device4444FormatsFeaturesEXT[ndx];
2903
2904		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2905	}
2906
2907	if (is4444FormatsFeaturesEXT)
2908		log << TestLog::Message << device4444FormatsFeaturesEXT[0] << TestLog::EndMessage;
2909
2910	if (is4444FormatsFeaturesEXT &&
2911		(device4444FormatsFeaturesEXT[0].formatA4R4G4B4 != device4444FormatsFeaturesEXT[1].formatA4R4G4B4 ||
2912		 device4444FormatsFeaturesEXT[0].formatA4B4G4R4 != device4444FormatsFeaturesEXT[1].formatA4B4G4R4))
2913	{
2914		TCU_FAIL("Mismatch between VkPhysicalDevice4444FormatsFeaturesEXT");
2915	}
2916	return tcu::TestStatus::pass("Querying succeeded");
2917}
2918
2919tcu::TestStatus testPhysicalDeviceFeatureShaderImageAtomicInt64FeaturesEXT (Context& context)
2920{
2921	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2922	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2923	const InstanceDriver&		vki				(instance.getDriver());
2924	const int					count			= 2u;
2925	TestLog&					log				= context.getTestContext().getLog();
2926	VkPhysicalDeviceFeatures2	extFeatures;
2927	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2928
2929	VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT	deviceShaderImageAtomicInt64FeaturesEXT[count];
2930	const bool											isShaderImageAtomicInt64FeaturesEXT = checkExtension(properties, "VK_EXT_shader_image_atomic_int64");
2931
2932	for (int ndx = 0; ndx < count; ++ndx)
2933	{
2934		deMemset(&deviceShaderImageAtomicInt64FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT));
2935		deviceShaderImageAtomicInt64FeaturesEXT[ndx].sType = isShaderImageAtomicInt64FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
2936		deviceShaderImageAtomicInt64FeaturesEXT[ndx].pNext = DE_NULL;
2937
2938		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2939		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2940		extFeatures.pNext = &deviceShaderImageAtomicInt64FeaturesEXT[ndx];
2941
2942		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2943	}
2944
2945	if (isShaderImageAtomicInt64FeaturesEXT)
2946		log << TestLog::Message << deviceShaderImageAtomicInt64FeaturesEXT[0] << TestLog::EndMessage;
2947
2948	if (isShaderImageAtomicInt64FeaturesEXT &&
2949		(deviceShaderImageAtomicInt64FeaturesEXT[0].shaderImageInt64Atomics != deviceShaderImageAtomicInt64FeaturesEXT[1].shaderImageInt64Atomics ||
2950		 deviceShaderImageAtomicInt64FeaturesEXT[0].sparseImageInt64Atomics != deviceShaderImageAtomicInt64FeaturesEXT[1].sparseImageInt64Atomics))
2951	{
2952		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT");
2953	}
2954	return tcu::TestStatus::pass("Querying succeeded");
2955}
2956
2957tcu::TestStatus testPhysicalDeviceFeatureFragmentShadingRateFeaturesKHR (Context& context)
2958{
2959	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2960	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
2961	const InstanceDriver&		vki				(instance.getDriver());
2962	const int					count			= 2u;
2963	TestLog&					log				= context.getTestContext().getLog();
2964	VkPhysicalDeviceFeatures2	extFeatures;
2965	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
2966
2967	VkPhysicalDeviceFragmentShadingRateFeaturesKHR	deviceFragmentShadingRateFeaturesKHR[count];
2968	const bool										isFragmentShadingRateFeaturesKHR = checkExtension(properties, "VK_KHR_fragment_shading_rate");
2969
2970	for (int ndx = 0; ndx < count; ++ndx)
2971	{
2972		deMemset(&deviceFragmentShadingRateFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFragmentShadingRateFeaturesKHR));
2973		deviceFragmentShadingRateFeaturesKHR[ndx].sType = isFragmentShadingRateFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
2974		deviceFragmentShadingRateFeaturesKHR[ndx].pNext = DE_NULL;
2975
2976		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
2977		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
2978		extFeatures.pNext = &deviceFragmentShadingRateFeaturesKHR[ndx];
2979
2980		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
2981	}
2982
2983	if (isFragmentShadingRateFeaturesKHR)
2984		log << TestLog::Message << deviceFragmentShadingRateFeaturesKHR[0] << TestLog::EndMessage;
2985
2986	if (isFragmentShadingRateFeaturesKHR &&
2987		(deviceFragmentShadingRateFeaturesKHR[0].pipelineFragmentShadingRate != deviceFragmentShadingRateFeaturesKHR[1].pipelineFragmentShadingRate ||
2988		 deviceFragmentShadingRateFeaturesKHR[0].primitiveFragmentShadingRate != deviceFragmentShadingRateFeaturesKHR[1].primitiveFragmentShadingRate ||
2989		 deviceFragmentShadingRateFeaturesKHR[0].attachmentFragmentShadingRate != deviceFragmentShadingRateFeaturesKHR[1].attachmentFragmentShadingRate))
2990	{
2991		TCU_FAIL("Mismatch between VkPhysicalDeviceFragmentShadingRateFeaturesKHR");
2992	}
2993	return tcu::TestStatus::pass("Querying succeeded");
2994}
2995
2996tcu::TestStatus testPhysicalDeviceFeatureShaderTerminateInvocationFeatures (Context& context)
2997{
2998	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
2999	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3000	const InstanceDriver&		vki				(instance.getDriver());
3001	const int					count			= 2u;
3002	TestLog&					log				= context.getTestContext().getLog();
3003	VkPhysicalDeviceFeatures2	extFeatures;
3004	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3005
3006	VkPhysicalDeviceShaderTerminateInvocationFeatures	deviceShaderTerminateInvocationFeatures[count];
3007	const bool											isShaderTerminateInvocationFeatures = checkExtension(properties, "VK_KHR_shader_terminate_invocation") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
3008
3009	for (int ndx = 0; ndx < count; ++ndx)
3010	{
3011		deMemset(&deviceShaderTerminateInvocationFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures));
3012		deviceShaderTerminateInvocationFeatures[ndx].sType = isShaderTerminateInvocationFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
3013		deviceShaderTerminateInvocationFeatures[ndx].pNext = DE_NULL;
3014
3015		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3016		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3017		extFeatures.pNext = &deviceShaderTerminateInvocationFeatures[ndx];
3018
3019		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3020	}
3021
3022	if (isShaderTerminateInvocationFeatures)
3023		log << TestLog::Message << deviceShaderTerminateInvocationFeatures[0] << TestLog::EndMessage;
3024
3025	if (isShaderTerminateInvocationFeatures &&
3026		(deviceShaderTerminateInvocationFeatures[0].shaderTerminateInvocation != deviceShaderTerminateInvocationFeatures[1].shaderTerminateInvocation))
3027	{
3028		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderTerminateInvocationFeatures");
3029	}
3030	return tcu::TestStatus::pass("Querying succeeded");
3031}
3032
3033tcu::TestStatus testPhysicalDeviceFeatureImage2DViewOf3DFeaturesEXT (Context& context)
3034{
3035	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3036	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3037	const InstanceDriver&		vki				(instance.getDriver());
3038	const int					count			= 2u;
3039	TestLog&					log				= context.getTestContext().getLog();
3040	VkPhysicalDeviceFeatures2	extFeatures;
3041	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3042
3043	VkPhysicalDeviceImage2DViewOf3DFeaturesEXT	deviceImage2DViewOf3DFeaturesEXT[count];
3044	const bool									isImage2DViewOf3DFeaturesEXT = checkExtension(properties, "VK_EXT_image_2d_view_of_3d");
3045
3046	for (int ndx = 0; ndx < count; ++ndx)
3047	{
3048		deMemset(&deviceImage2DViewOf3DFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT));
3049		deviceImage2DViewOf3DFeaturesEXT[ndx].sType = isImage2DViewOf3DFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3050		deviceImage2DViewOf3DFeaturesEXT[ndx].pNext = DE_NULL;
3051
3052		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3053		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3054		extFeatures.pNext = &deviceImage2DViewOf3DFeaturesEXT[ndx];
3055
3056		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3057	}
3058
3059	if (isImage2DViewOf3DFeaturesEXT)
3060		log << TestLog::Message << deviceImage2DViewOf3DFeaturesEXT[0] << TestLog::EndMessage;
3061
3062	if (isImage2DViewOf3DFeaturesEXT &&
3063		(deviceImage2DViewOf3DFeaturesEXT[0].image2DViewOf3D != deviceImage2DViewOf3DFeaturesEXT[1].image2DViewOf3D ||
3064		 deviceImage2DViewOf3DFeaturesEXT[0].sampler2DViewOf3D != deviceImage2DViewOf3DFeaturesEXT[1].sampler2DViewOf3D))
3065	{
3066		TCU_FAIL("Mismatch between VkPhysicalDeviceImage2DViewOf3DFeaturesEXT");
3067	}
3068	return tcu::TestStatus::pass("Querying succeeded");
3069}
3070
3071tcu::TestStatus testPhysicalDeviceFeatureMutableDescriptorTypeFeaturesEXT (Context& context)
3072{
3073	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3074	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3075	const InstanceDriver&		vki				(instance.getDriver());
3076	const int					count			= 2u;
3077	TestLog&					log				= context.getTestContext().getLog();
3078	VkPhysicalDeviceFeatures2	extFeatures;
3079	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3080
3081	VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT	deviceMutableDescriptorTypeFeaturesEXT[count];
3082	const bool											isMutableDescriptorTypeFeaturesEXT = checkExtension(properties, "VK_EXT_mutable_descriptor_type");
3083
3084	for (int ndx = 0; ndx < count; ++ndx)
3085	{
3086		deMemset(&deviceMutableDescriptorTypeFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT));
3087		deviceMutableDescriptorTypeFeaturesEXT[ndx].sType = isMutableDescriptorTypeFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3088		deviceMutableDescriptorTypeFeaturesEXT[ndx].pNext = DE_NULL;
3089
3090		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3091		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3092		extFeatures.pNext = &deviceMutableDescriptorTypeFeaturesEXT[ndx];
3093
3094		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3095	}
3096
3097	if (isMutableDescriptorTypeFeaturesEXT)
3098		log << TestLog::Message << deviceMutableDescriptorTypeFeaturesEXT[0] << TestLog::EndMessage;
3099
3100	if (isMutableDescriptorTypeFeaturesEXT &&
3101		(deviceMutableDescriptorTypeFeaturesEXT[0].mutableDescriptorType != deviceMutableDescriptorTypeFeaturesEXT[1].mutableDescriptorType))
3102	{
3103		TCU_FAIL("Mismatch between VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT");
3104	}
3105	return tcu::TestStatus::pass("Querying succeeded");
3106}
3107
3108tcu::TestStatus testPhysicalDeviceFeatureDepthClipControlFeaturesEXT (Context& context)
3109{
3110	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3111	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3112	const InstanceDriver&		vki				(instance.getDriver());
3113	const int					count			= 2u;
3114	TestLog&					log				= context.getTestContext().getLog();
3115	VkPhysicalDeviceFeatures2	extFeatures;
3116	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3117
3118	VkPhysicalDeviceDepthClipControlFeaturesEXT	deviceDepthClipControlFeaturesEXT[count];
3119	const bool									isDepthClipControlFeaturesEXT = checkExtension(properties, "VK_EXT_depth_clip_control");
3120
3121	for (int ndx = 0; ndx < count; ++ndx)
3122	{
3123		deMemset(&deviceDepthClipControlFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDepthClipControlFeaturesEXT));
3124		deviceDepthClipControlFeaturesEXT[ndx].sType = isDepthClipControlFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3125		deviceDepthClipControlFeaturesEXT[ndx].pNext = DE_NULL;
3126
3127		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3128		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3129		extFeatures.pNext = &deviceDepthClipControlFeaturesEXT[ndx];
3130
3131		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3132	}
3133
3134	if (isDepthClipControlFeaturesEXT)
3135		log << TestLog::Message << deviceDepthClipControlFeaturesEXT[0] << TestLog::EndMessage;
3136
3137	if (isDepthClipControlFeaturesEXT &&
3138		(deviceDepthClipControlFeaturesEXT[0].depthClipControl != deviceDepthClipControlFeaturesEXT[1].depthClipControl))
3139	{
3140		TCU_FAIL("Mismatch between VkPhysicalDeviceDepthClipControlFeaturesEXT");
3141	}
3142	return tcu::TestStatus::pass("Querying succeeded");
3143}
3144
3145tcu::TestStatus testPhysicalDeviceFeatureVertexInputDynamicStateFeaturesEXT (Context& context)
3146{
3147	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3148	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3149	const InstanceDriver&		vki				(instance.getDriver());
3150	const int					count			= 2u;
3151	TestLog&					log				= context.getTestContext().getLog();
3152	VkPhysicalDeviceFeatures2	extFeatures;
3153	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3154
3155	VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT	deviceVertexInputDynamicStateFeaturesEXT[count];
3156	const bool											isVertexInputDynamicStateFeaturesEXT = checkExtension(properties, "VK_EXT_vertex_input_dynamic_state");
3157
3158	for (int ndx = 0; ndx < count; ++ndx)
3159	{
3160		deMemset(&deviceVertexInputDynamicStateFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT));
3161		deviceVertexInputDynamicStateFeaturesEXT[ndx].sType = isVertexInputDynamicStateFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3162		deviceVertexInputDynamicStateFeaturesEXT[ndx].pNext = DE_NULL;
3163
3164		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3165		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3166		extFeatures.pNext = &deviceVertexInputDynamicStateFeaturesEXT[ndx];
3167
3168		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3169	}
3170
3171	if (isVertexInputDynamicStateFeaturesEXT)
3172		log << TestLog::Message << deviceVertexInputDynamicStateFeaturesEXT[0] << TestLog::EndMessage;
3173
3174	if (isVertexInputDynamicStateFeaturesEXT &&
3175		(deviceVertexInputDynamicStateFeaturesEXT[0].vertexInputDynamicState != deviceVertexInputDynamicStateFeaturesEXT[1].vertexInputDynamicState))
3176	{
3177		TCU_FAIL("Mismatch between VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT");
3178	}
3179	return tcu::TestStatus::pass("Querying succeeded");
3180}
3181
3182tcu::TestStatus testPhysicalDeviceFeatureColorWriteEnableFeaturesEXT (Context& context)
3183{
3184	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3185	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3186	const InstanceDriver&		vki				(instance.getDriver());
3187	const int					count			= 2u;
3188	TestLog&					log				= context.getTestContext().getLog();
3189	VkPhysicalDeviceFeatures2	extFeatures;
3190	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3191
3192	VkPhysicalDeviceColorWriteEnableFeaturesEXT	deviceColorWriteEnableFeaturesEXT[count];
3193	const bool									isColorWriteEnableFeaturesEXT = checkExtension(properties, "VK_EXT_color_write_enable");
3194
3195	for (int ndx = 0; ndx < count; ++ndx)
3196	{
3197		deMemset(&deviceColorWriteEnableFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceColorWriteEnableFeaturesEXT));
3198		deviceColorWriteEnableFeaturesEXT[ndx].sType = isColorWriteEnableFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3199		deviceColorWriteEnableFeaturesEXT[ndx].pNext = DE_NULL;
3200
3201		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3202		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3203		extFeatures.pNext = &deviceColorWriteEnableFeaturesEXT[ndx];
3204
3205		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3206	}
3207
3208	if (isColorWriteEnableFeaturesEXT)
3209		log << TestLog::Message << deviceColorWriteEnableFeaturesEXT[0] << TestLog::EndMessage;
3210
3211	if (isColorWriteEnableFeaturesEXT &&
3212		(deviceColorWriteEnableFeaturesEXT[0].colorWriteEnable != deviceColorWriteEnableFeaturesEXT[1].colorWriteEnable))
3213	{
3214		TCU_FAIL("Mismatch between VkPhysicalDeviceColorWriteEnableFeaturesEXT");
3215	}
3216	return tcu::TestStatus::pass("Querying succeeded");
3217}
3218
3219tcu::TestStatus testPhysicalDeviceFeatureSynchronization2Features (Context& context)
3220{
3221	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3222	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3223	const InstanceDriver&		vki				(instance.getDriver());
3224	const int					count			= 2u;
3225	TestLog&					log				= context.getTestContext().getLog();
3226	VkPhysicalDeviceFeatures2	extFeatures;
3227	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3228
3229	VkPhysicalDeviceSynchronization2Features	deviceSynchronization2Features[count];
3230	const bool									isSynchronization2Features = checkExtension(properties, "VK_KHR_synchronization2") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
3231
3232	for (int ndx = 0; ndx < count; ++ndx)
3233	{
3234		deMemset(&deviceSynchronization2Features[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSynchronization2Features));
3235		deviceSynchronization2Features[ndx].sType = isSynchronization2Features ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
3236		deviceSynchronization2Features[ndx].pNext = DE_NULL;
3237
3238		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3239		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3240		extFeatures.pNext = &deviceSynchronization2Features[ndx];
3241
3242		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3243	}
3244
3245	if (isSynchronization2Features)
3246		log << TestLog::Message << deviceSynchronization2Features[0] << TestLog::EndMessage;
3247
3248	if (isSynchronization2Features &&
3249		(deviceSynchronization2Features[0].synchronization2 != deviceSynchronization2Features[1].synchronization2))
3250	{
3251		TCU_FAIL("Mismatch between VkPhysicalDeviceSynchronization2Features");
3252	}
3253	return tcu::TestStatus::pass("Querying succeeded");
3254}
3255
3256tcu::TestStatus testPhysicalDeviceFeaturePrimitivesGeneratedQueryFeaturesEXT (Context& context)
3257{
3258	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3259	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3260	const InstanceDriver&		vki				(instance.getDriver());
3261	const int					count			= 2u;
3262	TestLog&					log				= context.getTestContext().getLog();
3263	VkPhysicalDeviceFeatures2	extFeatures;
3264	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3265
3266	VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT	devicePrimitivesGeneratedQueryFeaturesEXT[count];
3267	const bool											isPrimitivesGeneratedQueryFeaturesEXT = checkExtension(properties, "VK_EXT_primitives_generated_query");
3268
3269	for (int ndx = 0; ndx < count; ++ndx)
3270	{
3271		deMemset(&devicePrimitivesGeneratedQueryFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT));
3272		devicePrimitivesGeneratedQueryFeaturesEXT[ndx].sType = isPrimitivesGeneratedQueryFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3273		devicePrimitivesGeneratedQueryFeaturesEXT[ndx].pNext = DE_NULL;
3274
3275		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3276		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3277		extFeatures.pNext = &devicePrimitivesGeneratedQueryFeaturesEXT[ndx];
3278
3279		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3280	}
3281
3282	if (isPrimitivesGeneratedQueryFeaturesEXT)
3283		log << TestLog::Message << devicePrimitivesGeneratedQueryFeaturesEXT[0] << TestLog::EndMessage;
3284
3285	if (isPrimitivesGeneratedQueryFeaturesEXT &&
3286		(devicePrimitivesGeneratedQueryFeaturesEXT[0].primitivesGeneratedQuery != devicePrimitivesGeneratedQueryFeaturesEXT[1].primitivesGeneratedQuery ||
3287		 devicePrimitivesGeneratedQueryFeaturesEXT[0].primitivesGeneratedQueryWithRasterizerDiscard != devicePrimitivesGeneratedQueryFeaturesEXT[1].primitivesGeneratedQueryWithRasterizerDiscard ||
3288		 devicePrimitivesGeneratedQueryFeaturesEXT[0].primitivesGeneratedQueryWithNonZeroStreams != devicePrimitivesGeneratedQueryFeaturesEXT[1].primitivesGeneratedQueryWithNonZeroStreams))
3289	{
3290		TCU_FAIL("Mismatch between VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT");
3291	}
3292	return tcu::TestStatus::pass("Querying succeeded");
3293}
3294
3295tcu::TestStatus testPhysicalDeviceFeatureLegacyDitheringFeaturesEXT (Context& context)
3296{
3297	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3298	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3299	const InstanceDriver&		vki				(instance.getDriver());
3300	const int					count			= 2u;
3301	TestLog&					log				= context.getTestContext().getLog();
3302	VkPhysicalDeviceFeatures2	extFeatures;
3303	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3304
3305	VkPhysicalDeviceLegacyDitheringFeaturesEXT	deviceLegacyDitheringFeaturesEXT[count];
3306	const bool									isLegacyDitheringFeaturesEXT = checkExtension(properties, "VK_EXT_legacy_dithering");
3307
3308	for (int ndx = 0; ndx < count; ++ndx)
3309	{
3310		deMemset(&deviceLegacyDitheringFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceLegacyDitheringFeaturesEXT));
3311		deviceLegacyDitheringFeaturesEXT[ndx].sType = isLegacyDitheringFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3312		deviceLegacyDitheringFeaturesEXT[ndx].pNext = DE_NULL;
3313
3314		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3315		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3316		extFeatures.pNext = &deviceLegacyDitheringFeaturesEXT[ndx];
3317
3318		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3319	}
3320
3321	if (isLegacyDitheringFeaturesEXT)
3322		log << TestLog::Message << deviceLegacyDitheringFeaturesEXT[0] << TestLog::EndMessage;
3323
3324	if (isLegacyDitheringFeaturesEXT &&
3325		(deviceLegacyDitheringFeaturesEXT[0].legacyDithering != deviceLegacyDitheringFeaturesEXT[1].legacyDithering))
3326	{
3327		TCU_FAIL("Mismatch between VkPhysicalDeviceLegacyDitheringFeaturesEXT");
3328	}
3329	return tcu::TestStatus::pass("Querying succeeded");
3330}
3331
3332tcu::TestStatus testPhysicalDeviceFeatureMultisampledRenderToSingleSampledFeaturesEXT (Context& context)
3333{
3334	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3335	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3336	const InstanceDriver&		vki				(instance.getDriver());
3337	const int					count			= 2u;
3338	TestLog&					log				= context.getTestContext().getLog();
3339	VkPhysicalDeviceFeatures2	extFeatures;
3340	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3341
3342	VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT	deviceMultisampledRenderToSingleSampledFeaturesEXT[count];
3343	const bool														isMultisampledRenderToSingleSampledFeaturesEXT = checkExtension(properties, "VK_EXT_multisampled_render_to_single_sampled");
3344
3345	for (int ndx = 0; ndx < count; ++ndx)
3346	{
3347		deMemset(&deviceMultisampledRenderToSingleSampledFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT));
3348		deviceMultisampledRenderToSingleSampledFeaturesEXT[ndx].sType = isMultisampledRenderToSingleSampledFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3349		deviceMultisampledRenderToSingleSampledFeaturesEXT[ndx].pNext = DE_NULL;
3350
3351		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3352		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3353		extFeatures.pNext = &deviceMultisampledRenderToSingleSampledFeaturesEXT[ndx];
3354
3355		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3356	}
3357
3358	if (isMultisampledRenderToSingleSampledFeaturesEXT)
3359		log << TestLog::Message << deviceMultisampledRenderToSingleSampledFeaturesEXT[0] << TestLog::EndMessage;
3360
3361	if (isMultisampledRenderToSingleSampledFeaturesEXT &&
3362		(deviceMultisampledRenderToSingleSampledFeaturesEXT[0].multisampledRenderToSingleSampled != deviceMultisampledRenderToSingleSampledFeaturesEXT[1].multisampledRenderToSingleSampled))
3363	{
3364		TCU_FAIL("Mismatch between VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT");
3365	}
3366	return tcu::TestStatus::pass("Querying succeeded");
3367}
3368
3369tcu::TestStatus testPhysicalDeviceFeaturePipelineProtectedAccessFeaturesEXT (Context& context)
3370{
3371	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3372	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3373	const InstanceDriver&		vki				(instance.getDriver());
3374	const int					count			= 2u;
3375	TestLog&					log				= context.getTestContext().getLog();
3376	VkPhysicalDeviceFeatures2	extFeatures;
3377	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3378
3379	VkPhysicalDevicePipelineProtectedAccessFeaturesEXT	devicePipelineProtectedAccessFeaturesEXT[count];
3380	const bool											isPipelineProtectedAccessFeaturesEXT = checkExtension(properties, "VK_EXT_pipeline_protected_access");
3381
3382	for (int ndx = 0; ndx < count; ++ndx)
3383	{
3384		deMemset(&devicePipelineProtectedAccessFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePipelineProtectedAccessFeaturesEXT));
3385		devicePipelineProtectedAccessFeaturesEXT[ndx].sType = isPipelineProtectedAccessFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3386		devicePipelineProtectedAccessFeaturesEXT[ndx].pNext = DE_NULL;
3387
3388		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3389		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3390		extFeatures.pNext = &devicePipelineProtectedAccessFeaturesEXT[ndx];
3391
3392		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3393	}
3394
3395	if (isPipelineProtectedAccessFeaturesEXT)
3396		log << TestLog::Message << devicePipelineProtectedAccessFeaturesEXT[0] << TestLog::EndMessage;
3397
3398	if (isPipelineProtectedAccessFeaturesEXT &&
3399		(devicePipelineProtectedAccessFeaturesEXT[0].pipelineProtectedAccess != devicePipelineProtectedAccessFeaturesEXT[1].pipelineProtectedAccess))
3400	{
3401		TCU_FAIL("Mismatch between VkPhysicalDevicePipelineProtectedAccessFeaturesEXT");
3402	}
3403	return tcu::TestStatus::pass("Querying succeeded");
3404}
3405
3406tcu::TestStatus testPhysicalDeviceFeatureYcbcr2Plane444FormatsFeaturesEXT (Context& context)
3407{
3408	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3409	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3410	const InstanceDriver&		vki				(instance.getDriver());
3411	const int					count			= 2u;
3412	TestLog&					log				= context.getTestContext().getLog();
3413	VkPhysicalDeviceFeatures2	extFeatures;
3414	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3415
3416	VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT	deviceYcbcr2Plane444FormatsFeaturesEXT[count];
3417	const bool											isYcbcr2Plane444FormatsFeaturesEXT = checkExtension(properties, "VK_EXT_ycbcr_2plane_444_formats");
3418
3419	for (int ndx = 0; ndx < count; ++ndx)
3420	{
3421		deMemset(&deviceYcbcr2Plane444FormatsFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT));
3422		deviceYcbcr2Plane444FormatsFeaturesEXT[ndx].sType = isYcbcr2Plane444FormatsFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3423		deviceYcbcr2Plane444FormatsFeaturesEXT[ndx].pNext = DE_NULL;
3424
3425		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3426		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3427		extFeatures.pNext = &deviceYcbcr2Plane444FormatsFeaturesEXT[ndx];
3428
3429		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3430	}
3431
3432	if (isYcbcr2Plane444FormatsFeaturesEXT)
3433		log << TestLog::Message << deviceYcbcr2Plane444FormatsFeaturesEXT[0] << TestLog::EndMessage;
3434
3435	if (isYcbcr2Plane444FormatsFeaturesEXT &&
3436		(deviceYcbcr2Plane444FormatsFeaturesEXT[0].ycbcr2plane444Formats != deviceYcbcr2Plane444FormatsFeaturesEXT[1].ycbcr2plane444Formats))
3437	{
3438		TCU_FAIL("Mismatch between VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT");
3439	}
3440	return tcu::TestStatus::pass("Querying succeeded");
3441}
3442
3443tcu::TestStatus testPhysicalDeviceFeatureProvokingVertexFeaturesEXT (Context& context)
3444{
3445	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3446	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3447	const InstanceDriver&		vki				(instance.getDriver());
3448	const int					count			= 2u;
3449	TestLog&					log				= context.getTestContext().getLog();
3450	VkPhysicalDeviceFeatures2	extFeatures;
3451	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3452
3453	VkPhysicalDeviceProvokingVertexFeaturesEXT	deviceProvokingVertexFeaturesEXT[count];
3454	const bool									isProvokingVertexFeaturesEXT = checkExtension(properties, "VK_EXT_provoking_vertex");
3455
3456	for (int ndx = 0; ndx < count; ++ndx)
3457	{
3458		deMemset(&deviceProvokingVertexFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT));
3459		deviceProvokingVertexFeaturesEXT[ndx].sType = isProvokingVertexFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3460		deviceProvokingVertexFeaturesEXT[ndx].pNext = DE_NULL;
3461
3462		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3463		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3464		extFeatures.pNext = &deviceProvokingVertexFeaturesEXT[ndx];
3465
3466		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3467	}
3468
3469	if (isProvokingVertexFeaturesEXT)
3470		log << TestLog::Message << deviceProvokingVertexFeaturesEXT[0] << TestLog::EndMessage;
3471
3472	if (isProvokingVertexFeaturesEXT &&
3473		(deviceProvokingVertexFeaturesEXT[0].provokingVertexLast != deviceProvokingVertexFeaturesEXT[1].provokingVertexLast ||
3474		 deviceProvokingVertexFeaturesEXT[0].transformFeedbackPreservesProvokingVertex != deviceProvokingVertexFeaturesEXT[1].transformFeedbackPreservesProvokingVertex))
3475	{
3476		TCU_FAIL("Mismatch between VkPhysicalDeviceProvokingVertexFeaturesEXT");
3477	}
3478	return tcu::TestStatus::pass("Querying succeeded");
3479}
3480
3481tcu::TestStatus testPhysicalDeviceFeatureDescriptorBufferFeaturesEXT (Context& context)
3482{
3483	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3484	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3485	const InstanceDriver&		vki				(instance.getDriver());
3486	const int					count			= 2u;
3487	TestLog&					log				= context.getTestContext().getLog();
3488	VkPhysicalDeviceFeatures2	extFeatures;
3489	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3490
3491	VkPhysicalDeviceDescriptorBufferFeaturesEXT	deviceDescriptorBufferFeaturesEXT[count];
3492	const bool									isDescriptorBufferFeaturesEXT = checkExtension(properties, "VK_EXT_descriptor_buffer");
3493
3494	for (int ndx = 0; ndx < count; ++ndx)
3495	{
3496		deMemset(&deviceDescriptorBufferFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDescriptorBufferFeaturesEXT));
3497		deviceDescriptorBufferFeaturesEXT[ndx].sType = isDescriptorBufferFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3498		deviceDescriptorBufferFeaturesEXT[ndx].pNext = DE_NULL;
3499
3500		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3501		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3502		extFeatures.pNext = &deviceDescriptorBufferFeaturesEXT[ndx];
3503
3504		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3505	}
3506
3507	if (isDescriptorBufferFeaturesEXT)
3508		log << TestLog::Message << deviceDescriptorBufferFeaturesEXT[0] << TestLog::EndMessage;
3509
3510	if (isDescriptorBufferFeaturesEXT &&
3511		(deviceDescriptorBufferFeaturesEXT[0].descriptorBuffer != deviceDescriptorBufferFeaturesEXT[1].descriptorBuffer ||
3512		 deviceDescriptorBufferFeaturesEXT[0].descriptorBufferCaptureReplay != deviceDescriptorBufferFeaturesEXT[1].descriptorBufferCaptureReplay ||
3513		 deviceDescriptorBufferFeaturesEXT[0].descriptorBufferImageLayoutIgnored != deviceDescriptorBufferFeaturesEXT[1].descriptorBufferImageLayoutIgnored ||
3514		 deviceDescriptorBufferFeaturesEXT[0].descriptorBufferPushDescriptors != deviceDescriptorBufferFeaturesEXT[1].descriptorBufferPushDescriptors))
3515	{
3516		TCU_FAIL("Mismatch between VkPhysicalDeviceDescriptorBufferFeaturesEXT");
3517	}
3518	return tcu::TestStatus::pass("Querying succeeded");
3519}
3520
3521tcu::TestStatus testPhysicalDeviceFeatureShaderIntegerDotProductFeatures (Context& context)
3522{
3523	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3524	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3525	const InstanceDriver&		vki				(instance.getDriver());
3526	const int					count			= 2u;
3527	TestLog&					log				= context.getTestContext().getLog();
3528	VkPhysicalDeviceFeatures2	extFeatures;
3529	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3530
3531	VkPhysicalDeviceShaderIntegerDotProductFeatures	deviceShaderIntegerDotProductFeatures[count];
3532	const bool										isShaderIntegerDotProductFeatures = checkExtension(properties, "VK_KHR_shader_integer_dot_product") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
3533
3534	for (int ndx = 0; ndx < count; ++ndx)
3535	{
3536		deMemset(&deviceShaderIntegerDotProductFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures));
3537		deviceShaderIntegerDotProductFeatures[ndx].sType = isShaderIntegerDotProductFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
3538		deviceShaderIntegerDotProductFeatures[ndx].pNext = DE_NULL;
3539
3540		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3541		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3542		extFeatures.pNext = &deviceShaderIntegerDotProductFeatures[ndx];
3543
3544		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3545	}
3546
3547	if (isShaderIntegerDotProductFeatures)
3548		log << TestLog::Message << deviceShaderIntegerDotProductFeatures[0] << TestLog::EndMessage;
3549
3550	if (isShaderIntegerDotProductFeatures &&
3551		(deviceShaderIntegerDotProductFeatures[0].shaderIntegerDotProduct != deviceShaderIntegerDotProductFeatures[1].shaderIntegerDotProduct))
3552	{
3553		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderIntegerDotProductFeatures");
3554	}
3555	return tcu::TestStatus::pass("Querying succeeded");
3556}
3557
3558tcu::TestStatus testPhysicalDeviceFeatureFragmentShaderBarycentricFeaturesKHR (Context& context)
3559{
3560	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3561	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3562	const InstanceDriver&		vki				(instance.getDriver());
3563	const int					count			= 2u;
3564	TestLog&					log				= context.getTestContext().getLog();
3565	VkPhysicalDeviceFeatures2	extFeatures;
3566	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3567
3568	VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR	deviceFragmentShaderBarycentricFeaturesKHR[count];
3569	const bool												isFragmentShaderBarycentricFeaturesKHR = checkExtension(properties, "VK_KHR_fragment_shader_barycentric");
3570
3571	for (int ndx = 0; ndx < count; ++ndx)
3572	{
3573		deMemset(&deviceFragmentShaderBarycentricFeaturesKHR[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR));
3574		deviceFragmentShaderBarycentricFeaturesKHR[ndx].sType = isFragmentShaderBarycentricFeaturesKHR ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR : VK_STRUCTURE_TYPE_MAX_ENUM;
3575		deviceFragmentShaderBarycentricFeaturesKHR[ndx].pNext = DE_NULL;
3576
3577		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3578		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3579		extFeatures.pNext = &deviceFragmentShaderBarycentricFeaturesKHR[ndx];
3580
3581		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3582	}
3583
3584	if (isFragmentShaderBarycentricFeaturesKHR)
3585		log << TestLog::Message << deviceFragmentShaderBarycentricFeaturesKHR[0] << TestLog::EndMessage;
3586
3587	if (isFragmentShaderBarycentricFeaturesKHR &&
3588		(deviceFragmentShaderBarycentricFeaturesKHR[0].fragmentShaderBarycentric != deviceFragmentShaderBarycentricFeaturesKHR[1].fragmentShaderBarycentric))
3589	{
3590		TCU_FAIL("Mismatch between VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR");
3591	}
3592	return tcu::TestStatus::pass("Querying succeeded");
3593}
3594
3595tcu::TestStatus testPhysicalDeviceFeatureRGBA10X6FormatsFeaturesEXT (Context& context)
3596{
3597	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3598	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3599	const InstanceDriver&		vki				(instance.getDriver());
3600	const int					count			= 2u;
3601	TestLog&					log				= context.getTestContext().getLog();
3602	VkPhysicalDeviceFeatures2	extFeatures;
3603	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3604
3605	VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT	deviceRGBA10X6FormatsFeaturesEXT[count];
3606	const bool									isRGBA10X6FormatsFeaturesEXT = checkExtension(properties, "VK_EXT_rgba10x6_formats");
3607
3608	for (int ndx = 0; ndx < count; ++ndx)
3609	{
3610		deMemset(&deviceRGBA10X6FormatsFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT));
3611		deviceRGBA10X6FormatsFeaturesEXT[ndx].sType = isRGBA10X6FormatsFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3612		deviceRGBA10X6FormatsFeaturesEXT[ndx].pNext = DE_NULL;
3613
3614		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3615		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3616		extFeatures.pNext = &deviceRGBA10X6FormatsFeaturesEXT[ndx];
3617
3618		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3619	}
3620
3621	if (isRGBA10X6FormatsFeaturesEXT)
3622		log << TestLog::Message << deviceRGBA10X6FormatsFeaturesEXT[0] << TestLog::EndMessage;
3623
3624	if (isRGBA10X6FormatsFeaturesEXT &&
3625		(deviceRGBA10X6FormatsFeaturesEXT[0].formatRgba10x6WithoutYCbCrSampler != deviceRGBA10X6FormatsFeaturesEXT[1].formatRgba10x6WithoutYCbCrSampler))
3626	{
3627		TCU_FAIL("Mismatch between VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT");
3628	}
3629	return tcu::TestStatus::pass("Querying succeeded");
3630}
3631
3632tcu::TestStatus testPhysicalDeviceFeatureDynamicRenderingFeatures (Context& context)
3633{
3634	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3635	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3636	const InstanceDriver&		vki				(instance.getDriver());
3637	const int					count			= 2u;
3638	TestLog&					log				= context.getTestContext().getLog();
3639	VkPhysicalDeviceFeatures2	extFeatures;
3640	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3641
3642	VkPhysicalDeviceDynamicRenderingFeatures	deviceDynamicRenderingFeatures[count];
3643	const bool									isDynamicRenderingFeatures = checkExtension(properties, "VK_KHR_dynamic_rendering") || context.contextSupports(vk::ApiVersion(0, 1, 3, 0));
3644
3645	for (int ndx = 0; ndx < count; ++ndx)
3646	{
3647		deMemset(&deviceDynamicRenderingFeatures[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDynamicRenderingFeatures));
3648		deviceDynamicRenderingFeatures[ndx].sType = isDynamicRenderingFeatures ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES : VK_STRUCTURE_TYPE_MAX_ENUM;
3649		deviceDynamicRenderingFeatures[ndx].pNext = DE_NULL;
3650
3651		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3652		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3653		extFeatures.pNext = &deviceDynamicRenderingFeatures[ndx];
3654
3655		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3656	}
3657
3658	if (isDynamicRenderingFeatures)
3659		log << TestLog::Message << deviceDynamicRenderingFeatures[0] << TestLog::EndMessage;
3660
3661	if (isDynamicRenderingFeatures &&
3662		(deviceDynamicRenderingFeatures[0].dynamicRendering != deviceDynamicRenderingFeatures[1].dynamicRendering))
3663	{
3664		TCU_FAIL("Mismatch between VkPhysicalDeviceDynamicRenderingFeatures");
3665	}
3666	return tcu::TestStatus::pass("Querying succeeded");
3667}
3668
3669tcu::TestStatus testPhysicalDeviceFeatureImageViewMinLodFeaturesEXT (Context& context)
3670{
3671	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3672	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3673	const InstanceDriver&		vki				(instance.getDriver());
3674	const int					count			= 2u;
3675	TestLog&					log				= context.getTestContext().getLog();
3676	VkPhysicalDeviceFeatures2	extFeatures;
3677	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3678
3679	VkPhysicalDeviceImageViewMinLodFeaturesEXT	deviceImageViewMinLodFeaturesEXT[count];
3680	const bool									isImageViewMinLodFeaturesEXT = checkExtension(properties, "VK_EXT_image_view_min_lod");
3681
3682	for (int ndx = 0; ndx < count; ++ndx)
3683	{
3684		deMemset(&deviceImageViewMinLodFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImageViewMinLodFeaturesEXT));
3685		deviceImageViewMinLodFeaturesEXT[ndx].sType = isImageViewMinLodFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3686		deviceImageViewMinLodFeaturesEXT[ndx].pNext = DE_NULL;
3687
3688		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3689		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3690		extFeatures.pNext = &deviceImageViewMinLodFeaturesEXT[ndx];
3691
3692		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3693	}
3694
3695	if (isImageViewMinLodFeaturesEXT)
3696		log << TestLog::Message << deviceImageViewMinLodFeaturesEXT[0] << TestLog::EndMessage;
3697
3698	if (isImageViewMinLodFeaturesEXT &&
3699		(deviceImageViewMinLodFeaturesEXT[0].minLod != deviceImageViewMinLodFeaturesEXT[1].minLod))
3700	{
3701		TCU_FAIL("Mismatch between VkPhysicalDeviceImageViewMinLodFeaturesEXT");
3702	}
3703	return tcu::TestStatus::pass("Querying succeeded");
3704}
3705
3706tcu::TestStatus testPhysicalDeviceFeatureRasterizationOrderAttachmentAccessFeaturesEXT (Context& context)
3707{
3708	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3709	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3710	const InstanceDriver&		vki				(instance.getDriver());
3711	const int					count			= 2u;
3712	TestLog&					log				= context.getTestContext().getLog();
3713	VkPhysicalDeviceFeatures2	extFeatures;
3714	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3715
3716	VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT	deviceRasterizationOrderAttachmentAccessFeaturesEXT[count];
3717	const bool														isRasterizationOrderAttachmentAccessFeaturesEXT = checkExtension(properties, "VK_EXT_rasterization_order_attachment_access");
3718
3719	for (int ndx = 0; ndx < count; ++ndx)
3720	{
3721		deMemset(&deviceRasterizationOrderAttachmentAccessFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT));
3722		deviceRasterizationOrderAttachmentAccessFeaturesEXT[ndx].sType = isRasterizationOrderAttachmentAccessFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3723		deviceRasterizationOrderAttachmentAccessFeaturesEXT[ndx].pNext = DE_NULL;
3724
3725		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3726		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3727		extFeatures.pNext = &deviceRasterizationOrderAttachmentAccessFeaturesEXT[ndx];
3728
3729		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3730	}
3731
3732	if (isRasterizationOrderAttachmentAccessFeaturesEXT)
3733		log << TestLog::Message << deviceRasterizationOrderAttachmentAccessFeaturesEXT[0] << TestLog::EndMessage;
3734
3735	if (isRasterizationOrderAttachmentAccessFeaturesEXT &&
3736		(deviceRasterizationOrderAttachmentAccessFeaturesEXT[0].rasterizationOrderColorAttachmentAccess != deviceRasterizationOrderAttachmentAccessFeaturesEXT[1].rasterizationOrderColorAttachmentAccess ||
3737		 deviceRasterizationOrderAttachmentAccessFeaturesEXT[0].rasterizationOrderDepthAttachmentAccess != deviceRasterizationOrderAttachmentAccessFeaturesEXT[1].rasterizationOrderDepthAttachmentAccess ||
3738		 deviceRasterizationOrderAttachmentAccessFeaturesEXT[0].rasterizationOrderStencilAttachmentAccess != deviceRasterizationOrderAttachmentAccessFeaturesEXT[1].rasterizationOrderStencilAttachmentAccess))
3739	{
3740		TCU_FAIL("Mismatch between VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT");
3741	}
3742	return tcu::TestStatus::pass("Querying succeeded");
3743}
3744
3745tcu::TestStatus testPhysicalDeviceFeatureGraphicsPipelineLibraryFeaturesEXT (Context& context)
3746{
3747	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3748	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3749	const InstanceDriver&		vki				(instance.getDriver());
3750	const int					count			= 2u;
3751	TestLog&					log				= context.getTestContext().getLog();
3752	VkPhysicalDeviceFeatures2	extFeatures;
3753	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3754
3755	VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT	deviceGraphicsPipelineLibraryFeaturesEXT[count];
3756	const bool											isGraphicsPipelineLibraryFeaturesEXT = checkExtension(properties, "VK_EXT_graphics_pipeline_library");
3757
3758	for (int ndx = 0; ndx < count; ++ndx)
3759	{
3760		deMemset(&deviceGraphicsPipelineLibraryFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT));
3761		deviceGraphicsPipelineLibraryFeaturesEXT[ndx].sType = isGraphicsPipelineLibraryFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3762		deviceGraphicsPipelineLibraryFeaturesEXT[ndx].pNext = DE_NULL;
3763
3764		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3765		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3766		extFeatures.pNext = &deviceGraphicsPipelineLibraryFeaturesEXT[ndx];
3767
3768		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3769	}
3770
3771	if (isGraphicsPipelineLibraryFeaturesEXT)
3772		log << TestLog::Message << deviceGraphicsPipelineLibraryFeaturesEXT[0] << TestLog::EndMessage;
3773
3774	if (isGraphicsPipelineLibraryFeaturesEXT &&
3775		(deviceGraphicsPipelineLibraryFeaturesEXT[0].graphicsPipelineLibrary != deviceGraphicsPipelineLibraryFeaturesEXT[1].graphicsPipelineLibrary))
3776	{
3777		TCU_FAIL("Mismatch between VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT");
3778	}
3779	return tcu::TestStatus::pass("Querying succeeded");
3780}
3781
3782tcu::TestStatus testPhysicalDeviceFeatureShaderModuleIdentifierFeaturesEXT (Context& context)
3783{
3784	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3785	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3786	const InstanceDriver&		vki				(instance.getDriver());
3787	const int					count			= 2u;
3788	TestLog&					log				= context.getTestContext().getLog();
3789	VkPhysicalDeviceFeatures2	extFeatures;
3790	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3791
3792	VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT	deviceShaderModuleIdentifierFeaturesEXT[count];
3793	const bool											isShaderModuleIdentifierFeaturesEXT = checkExtension(properties, "VK_EXT_shader_module_identifier");
3794
3795	for (int ndx = 0; ndx < count; ++ndx)
3796	{
3797		deMemset(&deviceShaderModuleIdentifierFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT));
3798		deviceShaderModuleIdentifierFeaturesEXT[ndx].sType = isShaderModuleIdentifierFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3799		deviceShaderModuleIdentifierFeaturesEXT[ndx].pNext = DE_NULL;
3800
3801		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3802		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3803		extFeatures.pNext = &deviceShaderModuleIdentifierFeaturesEXT[ndx];
3804
3805		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3806	}
3807
3808	if (isShaderModuleIdentifierFeaturesEXT)
3809		log << TestLog::Message << deviceShaderModuleIdentifierFeaturesEXT[0] << TestLog::EndMessage;
3810
3811	if (isShaderModuleIdentifierFeaturesEXT &&
3812		(deviceShaderModuleIdentifierFeaturesEXT[0].shaderModuleIdentifier != deviceShaderModuleIdentifierFeaturesEXT[1].shaderModuleIdentifier))
3813	{
3814		TCU_FAIL("Mismatch between VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT");
3815	}
3816	return tcu::TestStatus::pass("Querying succeeded");
3817}
3818
3819tcu::TestStatus testPhysicalDeviceFeatureImageCompressionControlFeaturesEXT (Context& context)
3820{
3821	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3822	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3823	const InstanceDriver&		vki				(instance.getDriver());
3824	const int					count			= 2u;
3825	TestLog&					log				= context.getTestContext().getLog();
3826	VkPhysicalDeviceFeatures2	extFeatures;
3827	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3828
3829	VkPhysicalDeviceImageCompressionControlFeaturesEXT	deviceImageCompressionControlFeaturesEXT[count];
3830	const bool											isImageCompressionControlFeaturesEXT = checkExtension(properties, "VK_EXT_image_compression_control");
3831
3832	for (int ndx = 0; ndx < count; ++ndx)
3833	{
3834		deMemset(&deviceImageCompressionControlFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImageCompressionControlFeaturesEXT));
3835		deviceImageCompressionControlFeaturesEXT[ndx].sType = isImageCompressionControlFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3836		deviceImageCompressionControlFeaturesEXT[ndx].pNext = DE_NULL;
3837
3838		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3839		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3840		extFeatures.pNext = &deviceImageCompressionControlFeaturesEXT[ndx];
3841
3842		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3843	}
3844
3845	if (isImageCompressionControlFeaturesEXT)
3846		log << TestLog::Message << deviceImageCompressionControlFeaturesEXT[0] << TestLog::EndMessage;
3847
3848	if (isImageCompressionControlFeaturesEXT &&
3849		(deviceImageCompressionControlFeaturesEXT[0].imageCompressionControl != deviceImageCompressionControlFeaturesEXT[1].imageCompressionControl))
3850	{
3851		TCU_FAIL("Mismatch between VkPhysicalDeviceImageCompressionControlFeaturesEXT");
3852	}
3853	return tcu::TestStatus::pass("Querying succeeded");
3854}
3855
3856tcu::TestStatus testPhysicalDeviceFeatureImageCompressionControlSwapchainFeaturesEXT (Context& context)
3857{
3858	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3859	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3860	const InstanceDriver&		vki				(instance.getDriver());
3861	const int					count			= 2u;
3862	TestLog&					log				= context.getTestContext().getLog();
3863	VkPhysicalDeviceFeatures2	extFeatures;
3864	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3865
3866	VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT	deviceImageCompressionControlSwapchainFeaturesEXT[count];
3867	const bool													isImageCompressionControlSwapchainFeaturesEXT = checkExtension(properties, "VK_EXT_image_compression_control_swapchain");
3868
3869	for (int ndx = 0; ndx < count; ++ndx)
3870	{
3871		deMemset(&deviceImageCompressionControlSwapchainFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT));
3872		deviceImageCompressionControlSwapchainFeaturesEXT[ndx].sType = isImageCompressionControlSwapchainFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3873		deviceImageCompressionControlSwapchainFeaturesEXT[ndx].pNext = DE_NULL;
3874
3875		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3876		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3877		extFeatures.pNext = &deviceImageCompressionControlSwapchainFeaturesEXT[ndx];
3878
3879		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3880	}
3881
3882	if (isImageCompressionControlSwapchainFeaturesEXT)
3883		log << TestLog::Message << deviceImageCompressionControlSwapchainFeaturesEXT[0] << TestLog::EndMessage;
3884
3885	if (isImageCompressionControlSwapchainFeaturesEXT &&
3886		(deviceImageCompressionControlSwapchainFeaturesEXT[0].imageCompressionControlSwapchain != deviceImageCompressionControlSwapchainFeaturesEXT[1].imageCompressionControlSwapchain))
3887	{
3888		TCU_FAIL("Mismatch between VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT");
3889	}
3890	return tcu::TestStatus::pass("Querying succeeded");
3891}
3892
3893tcu::TestStatus testPhysicalDeviceFeatureSubpassMergeFeedbackFeaturesEXT (Context& context)
3894{
3895	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3896	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3897	const InstanceDriver&		vki				(instance.getDriver());
3898	const int					count			= 2u;
3899	TestLog&					log				= context.getTestContext().getLog();
3900	VkPhysicalDeviceFeatures2	extFeatures;
3901	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3902
3903	VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT	deviceSubpassMergeFeedbackFeaturesEXT[count];
3904	const bool										isSubpassMergeFeedbackFeaturesEXT = checkExtension(properties, "VK_EXT_subpass_merge_feedback");
3905
3906	for (int ndx = 0; ndx < count; ++ndx)
3907	{
3908		deMemset(&deviceSubpassMergeFeedbackFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT));
3909		deviceSubpassMergeFeedbackFeaturesEXT[ndx].sType = isSubpassMergeFeedbackFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3910		deviceSubpassMergeFeedbackFeaturesEXT[ndx].pNext = DE_NULL;
3911
3912		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3913		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3914		extFeatures.pNext = &deviceSubpassMergeFeedbackFeaturesEXT[ndx];
3915
3916		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3917	}
3918
3919	if (isSubpassMergeFeedbackFeaturesEXT)
3920		log << TestLog::Message << deviceSubpassMergeFeedbackFeaturesEXT[0] << TestLog::EndMessage;
3921
3922	if (isSubpassMergeFeedbackFeaturesEXT &&
3923		(deviceSubpassMergeFeedbackFeaturesEXT[0].subpassMergeFeedback != deviceSubpassMergeFeedbackFeaturesEXT[1].subpassMergeFeedback))
3924	{
3925		TCU_FAIL("Mismatch between VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT");
3926	}
3927	return tcu::TestStatus::pass("Querying succeeded");
3928}
3929
3930tcu::TestStatus testPhysicalDeviceFeatureOpacityMicromapFeaturesEXT (Context& context)
3931{
3932	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3933	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3934	const InstanceDriver&		vki				(instance.getDriver());
3935	const int					count			= 2u;
3936	TestLog&					log				= context.getTestContext().getLog();
3937	VkPhysicalDeviceFeatures2	extFeatures;
3938	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3939
3940	VkPhysicalDeviceOpacityMicromapFeaturesEXT	deviceOpacityMicromapFeaturesEXT[count];
3941	const bool									isOpacityMicromapFeaturesEXT = checkExtension(properties, "VK_EXT_opacity_micromap");
3942
3943	for (int ndx = 0; ndx < count; ++ndx)
3944	{
3945		deMemset(&deviceOpacityMicromapFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceOpacityMicromapFeaturesEXT));
3946		deviceOpacityMicromapFeaturesEXT[ndx].sType = isOpacityMicromapFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3947		deviceOpacityMicromapFeaturesEXT[ndx].pNext = DE_NULL;
3948
3949		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3950		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3951		extFeatures.pNext = &deviceOpacityMicromapFeaturesEXT[ndx];
3952
3953		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3954	}
3955
3956	if (isOpacityMicromapFeaturesEXT)
3957		log << TestLog::Message << deviceOpacityMicromapFeaturesEXT[0] << TestLog::EndMessage;
3958
3959	if (isOpacityMicromapFeaturesEXT &&
3960		(deviceOpacityMicromapFeaturesEXT[0].micromap != deviceOpacityMicromapFeaturesEXT[1].micromap ||
3961		 deviceOpacityMicromapFeaturesEXT[0].micromapCaptureReplay != deviceOpacityMicromapFeaturesEXT[1].micromapCaptureReplay ||
3962		 deviceOpacityMicromapFeaturesEXT[0].micromapHostCommands != deviceOpacityMicromapFeaturesEXT[1].micromapHostCommands))
3963	{
3964		TCU_FAIL("Mismatch between VkPhysicalDeviceOpacityMicromapFeaturesEXT");
3965	}
3966	return tcu::TestStatus::pass("Querying succeeded");
3967}
3968
3969tcu::TestStatus testPhysicalDeviceFeaturePipelinePropertiesFeaturesEXT (Context& context)
3970{
3971	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
3972	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
3973	const InstanceDriver&		vki				(instance.getDriver());
3974	const int					count			= 2u;
3975	TestLog&					log				= context.getTestContext().getLog();
3976	VkPhysicalDeviceFeatures2	extFeatures;
3977	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
3978
3979	VkPhysicalDevicePipelinePropertiesFeaturesEXT	devicePipelinePropertiesFeaturesEXT[count];
3980	const bool										isPipelinePropertiesFeaturesEXT = checkExtension(properties, "VK_EXT_pipeline_properties");
3981
3982	for (int ndx = 0; ndx < count; ++ndx)
3983	{
3984		deMemset(&devicePipelinePropertiesFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePipelinePropertiesFeaturesEXT));
3985		devicePipelinePropertiesFeaturesEXT[ndx].sType = isPipelinePropertiesFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
3986		devicePipelinePropertiesFeaturesEXT[ndx].pNext = DE_NULL;
3987
3988		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
3989		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
3990		extFeatures.pNext = &devicePipelinePropertiesFeaturesEXT[ndx];
3991
3992		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
3993	}
3994
3995	if (isPipelinePropertiesFeaturesEXT)
3996		log << TestLog::Message << devicePipelinePropertiesFeaturesEXT[0] << TestLog::EndMessage;
3997
3998	if (isPipelinePropertiesFeaturesEXT &&
3999		(devicePipelinePropertiesFeaturesEXT[0].pipelinePropertiesIdentifier != devicePipelinePropertiesFeaturesEXT[1].pipelinePropertiesIdentifier))
4000	{
4001		TCU_FAIL("Mismatch between VkPhysicalDevicePipelinePropertiesFeaturesEXT");
4002	}
4003	return tcu::TestStatus::pass("Querying succeeded");
4004}
4005
4006tcu::TestStatus testPhysicalDeviceFeatureNonSeamlessCubeMapFeaturesEXT (Context& context)
4007{
4008	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4009	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4010	const InstanceDriver&		vki				(instance.getDriver());
4011	const int					count			= 2u;
4012	TestLog&					log				= context.getTestContext().getLog();
4013	VkPhysicalDeviceFeatures2	extFeatures;
4014	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4015
4016	VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT	deviceNonSeamlessCubeMapFeaturesEXT[count];
4017	const bool										isNonSeamlessCubeMapFeaturesEXT = checkExtension(properties, "VK_EXT_non_seamless_cube_map");
4018
4019	for (int ndx = 0; ndx < count; ++ndx)
4020	{
4021		deMemset(&deviceNonSeamlessCubeMapFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT));
4022		deviceNonSeamlessCubeMapFeaturesEXT[ndx].sType = isNonSeamlessCubeMapFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4023		deviceNonSeamlessCubeMapFeaturesEXT[ndx].pNext = DE_NULL;
4024
4025		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4026		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4027		extFeatures.pNext = &deviceNonSeamlessCubeMapFeaturesEXT[ndx];
4028
4029		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4030	}
4031
4032	if (isNonSeamlessCubeMapFeaturesEXT)
4033		log << TestLog::Message << deviceNonSeamlessCubeMapFeaturesEXT[0] << TestLog::EndMessage;
4034
4035	if (isNonSeamlessCubeMapFeaturesEXT &&
4036		(deviceNonSeamlessCubeMapFeaturesEXT[0].nonSeamlessCubeMap != deviceNonSeamlessCubeMapFeaturesEXT[1].nonSeamlessCubeMap))
4037	{
4038		TCU_FAIL("Mismatch between VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT");
4039	}
4040	return tcu::TestStatus::pass("Querying succeeded");
4041}
4042
4043tcu::TestStatus testPhysicalDeviceFeaturePipelineRobustnessFeaturesEXT (Context& context)
4044{
4045	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4046	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4047	const InstanceDriver&		vki				(instance.getDriver());
4048	const int					count			= 2u;
4049	TestLog&					log				= context.getTestContext().getLog();
4050	VkPhysicalDeviceFeatures2	extFeatures;
4051	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4052
4053	VkPhysicalDevicePipelineRobustnessFeaturesEXT	devicePipelineRobustnessFeaturesEXT[count];
4054	const bool										isPipelineRobustnessFeaturesEXT = checkExtension(properties, "VK_EXT_pipeline_robustness");
4055
4056	for (int ndx = 0; ndx < count; ++ndx)
4057	{
4058		deMemset(&devicePipelineRobustnessFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDevicePipelineRobustnessFeaturesEXT));
4059		devicePipelineRobustnessFeaturesEXT[ndx].sType = isPipelineRobustnessFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4060		devicePipelineRobustnessFeaturesEXT[ndx].pNext = DE_NULL;
4061
4062		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4063		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4064		extFeatures.pNext = &devicePipelineRobustnessFeaturesEXT[ndx];
4065
4066		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4067	}
4068
4069	if (isPipelineRobustnessFeaturesEXT)
4070		log << TestLog::Message << devicePipelineRobustnessFeaturesEXT[0] << TestLog::EndMessage;
4071
4072	if (isPipelineRobustnessFeaturesEXT &&
4073		(devicePipelineRobustnessFeaturesEXT[0].pipelineRobustness != devicePipelineRobustnessFeaturesEXT[1].pipelineRobustness))
4074	{
4075		TCU_FAIL("Mismatch between VkPhysicalDevicePipelineRobustnessFeaturesEXT");
4076	}
4077	return tcu::TestStatus::pass("Querying succeeded");
4078}
4079
4080tcu::TestStatus testPhysicalDeviceFeatureAmigoProfilingFeaturesSEC (Context& context)
4081{
4082	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4083	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4084	const InstanceDriver&		vki				(instance.getDriver());
4085	const int					count			= 2u;
4086	TestLog&					log				= context.getTestContext().getLog();
4087	VkPhysicalDeviceFeatures2	extFeatures;
4088	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4089
4090	VkPhysicalDeviceAmigoProfilingFeaturesSEC	deviceAmigoProfilingFeaturesSEC[count];
4091	const bool									isAmigoProfilingFeaturesSEC = checkExtension(properties, "VK_SEC_amigo_profiling");
4092
4093	for (int ndx = 0; ndx < count; ++ndx)
4094	{
4095		deMemset(&deviceAmigoProfilingFeaturesSEC[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceAmigoProfilingFeaturesSEC));
4096		deviceAmigoProfilingFeaturesSEC[ndx].sType = isAmigoProfilingFeaturesSEC ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC : VK_STRUCTURE_TYPE_MAX_ENUM;
4097		deviceAmigoProfilingFeaturesSEC[ndx].pNext = DE_NULL;
4098
4099		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4100		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4101		extFeatures.pNext = &deviceAmigoProfilingFeaturesSEC[ndx];
4102
4103		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4104	}
4105
4106	if (isAmigoProfilingFeaturesSEC)
4107		log << TestLog::Message << deviceAmigoProfilingFeaturesSEC[0] << TestLog::EndMessage;
4108
4109	if (isAmigoProfilingFeaturesSEC &&
4110		(deviceAmigoProfilingFeaturesSEC[0].amigoProfiling != deviceAmigoProfilingFeaturesSEC[1].amigoProfiling))
4111	{
4112		TCU_FAIL("Mismatch between VkPhysicalDeviceAmigoProfilingFeaturesSEC");
4113	}
4114	return tcu::TestStatus::pass("Querying succeeded");
4115}
4116
4117tcu::TestStatus testPhysicalDeviceFeatureAttachmentFeedbackLoopLayoutFeaturesEXT (Context& context)
4118{
4119	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4120	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4121	const InstanceDriver&		vki				(instance.getDriver());
4122	const int					count			= 2u;
4123	TestLog&					log				= context.getTestContext().getLog();
4124	VkPhysicalDeviceFeatures2	extFeatures;
4125	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4126
4127	VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT	deviceAttachmentFeedbackLoopLayoutFeaturesEXT[count];
4128	const bool												isAttachmentFeedbackLoopLayoutFeaturesEXT = checkExtension(properties, "VK_EXT_attachment_feedback_loop_layout");
4129
4130	for (int ndx = 0; ndx < count; ++ndx)
4131	{
4132		deMemset(&deviceAttachmentFeedbackLoopLayoutFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT));
4133		deviceAttachmentFeedbackLoopLayoutFeaturesEXT[ndx].sType = isAttachmentFeedbackLoopLayoutFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4134		deviceAttachmentFeedbackLoopLayoutFeaturesEXT[ndx].pNext = DE_NULL;
4135
4136		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4137		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4138		extFeatures.pNext = &deviceAttachmentFeedbackLoopLayoutFeaturesEXT[ndx];
4139
4140		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4141	}
4142
4143	if (isAttachmentFeedbackLoopLayoutFeaturesEXT)
4144		log << TestLog::Message << deviceAttachmentFeedbackLoopLayoutFeaturesEXT[0] << TestLog::EndMessage;
4145
4146	if (isAttachmentFeedbackLoopLayoutFeaturesEXT &&
4147		(deviceAttachmentFeedbackLoopLayoutFeaturesEXT[0].attachmentFeedbackLoopLayout != deviceAttachmentFeedbackLoopLayoutFeaturesEXT[1].attachmentFeedbackLoopLayout))
4148	{
4149		TCU_FAIL("Mismatch between VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT");
4150	}
4151	return tcu::TestStatus::pass("Querying succeeded");
4152}
4153
4154tcu::TestStatus testPhysicalDeviceFeatureDepthClampZeroOneFeaturesEXT (Context& context)
4155{
4156	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4157	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4158	const InstanceDriver&		vki				(instance.getDriver());
4159	const int					count			= 2u;
4160	TestLog&					log				= context.getTestContext().getLog();
4161	VkPhysicalDeviceFeatures2	extFeatures;
4162	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4163
4164	VkPhysicalDeviceDepthClampZeroOneFeaturesEXT	deviceDepthClampZeroOneFeaturesEXT[count];
4165	const bool										isDepthClampZeroOneFeaturesEXT = checkExtension(properties, "VK_EXT_depth_clamp_zero_one");
4166
4167	for (int ndx = 0; ndx < count; ++ndx)
4168	{
4169		deMemset(&deviceDepthClampZeroOneFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceDepthClampZeroOneFeaturesEXT));
4170		deviceDepthClampZeroOneFeaturesEXT[ndx].sType = isDepthClampZeroOneFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4171		deviceDepthClampZeroOneFeaturesEXT[ndx].pNext = DE_NULL;
4172
4173		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4174		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4175		extFeatures.pNext = &deviceDepthClampZeroOneFeaturesEXT[ndx];
4176
4177		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4178	}
4179
4180	if (isDepthClampZeroOneFeaturesEXT)
4181		log << TestLog::Message << deviceDepthClampZeroOneFeaturesEXT[0] << TestLog::EndMessage;
4182
4183	if (isDepthClampZeroOneFeaturesEXT &&
4184		(deviceDepthClampZeroOneFeaturesEXT[0].depthClampZeroOne != deviceDepthClampZeroOneFeaturesEXT[1].depthClampZeroOne))
4185	{
4186		TCU_FAIL("Mismatch between VkPhysicalDeviceDepthClampZeroOneFeaturesEXT");
4187	}
4188	return tcu::TestStatus::pass("Querying succeeded");
4189}
4190
4191tcu::TestStatus testPhysicalDeviceFeatureAddressBindingReportFeaturesEXT (Context& context)
4192{
4193	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4194	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4195	const InstanceDriver&		vki				(instance.getDriver());
4196	const int					count			= 2u;
4197	TestLog&					log				= context.getTestContext().getLog();
4198	VkPhysicalDeviceFeatures2	extFeatures;
4199	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4200
4201	VkPhysicalDeviceAddressBindingReportFeaturesEXT	deviceAddressBindingReportFeaturesEXT[count];
4202	const bool										isAddressBindingReportFeaturesEXT = checkExtension(properties, "VK_EXT_device_address_binding_report");
4203
4204	for (int ndx = 0; ndx < count; ++ndx)
4205	{
4206		deMemset(&deviceAddressBindingReportFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceAddressBindingReportFeaturesEXT));
4207		deviceAddressBindingReportFeaturesEXT[ndx].sType = isAddressBindingReportFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4208		deviceAddressBindingReportFeaturesEXT[ndx].pNext = DE_NULL;
4209
4210		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4211		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4212		extFeatures.pNext = &deviceAddressBindingReportFeaturesEXT[ndx];
4213
4214		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4215	}
4216
4217	if (isAddressBindingReportFeaturesEXT)
4218		log << TestLog::Message << deviceAddressBindingReportFeaturesEXT[0] << TestLog::EndMessage;
4219
4220	if (isAddressBindingReportFeaturesEXT &&
4221		(deviceAddressBindingReportFeaturesEXT[0].reportAddressBinding != deviceAddressBindingReportFeaturesEXT[1].reportAddressBinding))
4222	{
4223		TCU_FAIL("Mismatch between VkPhysicalDeviceAddressBindingReportFeaturesEXT");
4224	}
4225	return tcu::TestStatus::pass("Querying succeeded");
4226}
4227
4228tcu::TestStatus testPhysicalDeviceFeatureFaultFeaturesEXT (Context& context)
4229{
4230	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4231	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4232	const InstanceDriver&		vki				(instance.getDriver());
4233	const int					count			= 2u;
4234	TestLog&					log				= context.getTestContext().getLog();
4235	VkPhysicalDeviceFeatures2	extFeatures;
4236	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4237
4238	VkPhysicalDeviceFaultFeaturesEXT	deviceFaultFeaturesEXT[count];
4239	const bool							isFaultFeaturesEXT = checkExtension(properties, "VK_EXT_device_fault");
4240
4241	for (int ndx = 0; ndx < count; ++ndx)
4242	{
4243		deMemset(&deviceFaultFeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceFaultFeaturesEXT));
4244		deviceFaultFeaturesEXT[ndx].sType = isFaultFeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4245		deviceFaultFeaturesEXT[ndx].pNext = DE_NULL;
4246
4247		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4248		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4249		extFeatures.pNext = &deviceFaultFeaturesEXT[ndx];
4250
4251		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4252	}
4253
4254	if (isFaultFeaturesEXT)
4255		log << TestLog::Message << deviceFaultFeaturesEXT[0] << TestLog::EndMessage;
4256
4257	if (isFaultFeaturesEXT &&
4258		(deviceFaultFeaturesEXT[0].deviceFault != deviceFaultFeaturesEXT[1].deviceFault ||
4259		 deviceFaultFeaturesEXT[0].deviceFaultVendorBinary != deviceFaultFeaturesEXT[1].deviceFaultVendorBinary))
4260	{
4261		TCU_FAIL("Mismatch between VkPhysicalDeviceFaultFeaturesEXT");
4262	}
4263	return tcu::TestStatus::pass("Querying succeeded");
4264}
4265
4266tcu::TestStatus testPhysicalDeviceFeatureSwapchainMaintenance1FeaturesEXT (Context& context)
4267{
4268	const VkPhysicalDevice		physicalDevice	= context.getPhysicalDevice();
4269	const CustomInstance		instance		(createCustomInstanceWithExtension(context, "VK_KHR_get_physical_device_properties2"));
4270	const InstanceDriver&		vki				(instance.getDriver());
4271	const int					count			= 2u;
4272	TestLog&					log				= context.getTestContext().getLog();
4273	VkPhysicalDeviceFeatures2	extFeatures;
4274	vector<VkExtensionProperties> properties	= enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
4275
4276	VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT	deviceSwapchainMaintenance1FeaturesEXT[count];
4277	const bool											isSwapchainMaintenance1FeaturesEXT = checkExtension(properties, "VK_EXT_swapchain_maintenance1");
4278
4279	for (int ndx = 0; ndx < count; ++ndx)
4280	{
4281		deMemset(&deviceSwapchainMaintenance1FeaturesEXT[ndx], 0xFF * ndx, sizeof(VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT));
4282		deviceSwapchainMaintenance1FeaturesEXT[ndx].sType = isSwapchainMaintenance1FeaturesEXT ? VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT : VK_STRUCTURE_TYPE_MAX_ENUM;
4283		deviceSwapchainMaintenance1FeaturesEXT[ndx].pNext = DE_NULL;
4284
4285		deMemset(&extFeatures.features, 0xcd, sizeof(extFeatures.features));
4286		extFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
4287		extFeatures.pNext = &deviceSwapchainMaintenance1FeaturesEXT[ndx];
4288
4289		vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
4290	}
4291
4292	if (isSwapchainMaintenance1FeaturesEXT)
4293		log << TestLog::Message << deviceSwapchainMaintenance1FeaturesEXT[0] << TestLog::EndMessage;
4294
4295	if (isSwapchainMaintenance1FeaturesEXT &&
4296		(deviceSwapchainMaintenance1FeaturesEXT[0].swapchainMaintenance1 != deviceSwapchainMaintenance1FeaturesEXT[1].swapchainMaintenance1))
4297	{
4298		TCU_FAIL("Mismatch between VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT");
4299	}
4300	return tcu::TestStatus::pass("Querying succeeded");
4301}
4302
4303tcu::TestStatus createDeviceWithPromoted11Structures (Context& context)
4304{
4305	if (!context.contextSupports(vk::ApiVersion(0, 1, 1, 0)))
4306		TCU_THROW(NotSupportedError, "Vulkan 1.1 is not supported");
4307
4308	const PlatformInterface&		platformInterface	= context.getPlatformInterface();
4309	const CustomInstance			instance			(createCustomInstanceFromContext(context));
4310	const InstanceDriver&			instanceDriver		(instance.getDriver());
4311	const VkPhysicalDevice			physicalDevice		= chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
4312	const deUint32					queueFamilyIndex	= 0;
4313	const deUint32					queueCount			= 1;
4314	const deUint32					queueIndex			= 0;
4315	const float						queuePriority		= 1.0f;
4316
4317	const vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(instanceDriver, physicalDevice);
4318
4319	const VkDeviceQueueCreateInfo	deviceQueueCreateInfo =
4320	{
4321		VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
4322		DE_NULL,
4323		(VkDeviceQueueCreateFlags)0u,
4324		queueFamilyIndex,						//queueFamilyIndex;
4325		queueCount,								//queueCount;
4326		&queuePriority,							//pQueuePriorities;
4327	};
4328
4329	VkPhysicalDevice16BitStorageFeatures device16BitStorageFeatures = initVulkanStructure();
4330	VkPhysicalDeviceMultiviewFeatures deviceMultiviewFeatures = initVulkanStructure(&device16BitStorageFeatures);
4331	VkPhysicalDeviceVariablePointerFeatures deviceVariablePointersFeatures = initVulkanStructure(&deviceMultiviewFeatures);
4332	VkPhysicalDeviceProtectedMemoryFeatures deviceProtectedMemoryFeatures = initVulkanStructure(&deviceVariablePointersFeatures);
4333	VkPhysicalDeviceSamplerYcbcrConversionFeatures deviceSamplerYcbcrConversionFeatures = initVulkanStructure(&deviceProtectedMemoryFeatures);
4334	VkPhysicalDeviceShaderDrawParameterFeatures deviceShaderDrawParametersFeatures = initVulkanStructure(&deviceSamplerYcbcrConversionFeatures);
4335	VkPhysicalDeviceFeatures2 extFeatures = initVulkanStructure(&deviceShaderDrawParametersFeatures);
4336
4337	instanceDriver.getPhysicalDeviceFeatures2 (physicalDevice, &extFeatures);
4338
4339	const VkDeviceCreateInfo		deviceCreateInfo =
4340	{
4341		VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,	//sType;
4342		&extFeatures,							//pNext;
4343		(VkDeviceCreateFlags)0u,
4344		1,										//queueRecordCount;
4345		&deviceQueueCreateInfo,					//pRequestedQueues;
4346		0,										//layerCount;
4347		DE_NULL,								//ppEnabledLayerNames;
4348		0,										//extensionCount;
4349		DE_NULL,								//ppEnabledExtensionNames;
4350		DE_NULL,								//pEnabledFeatures;
4351	};
4352
4353	const Unique<VkDevice>			device			(createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), platformInterface, instance, instanceDriver, physicalDevice, &deviceCreateInfo));
4354	const DeviceDriver				deviceDriver	(platformInterface, instance, device.get());
4355	const VkQueue					queue			= getDeviceQueue(deviceDriver, *device, queueFamilyIndex, queueIndex);
4356
4357	VK_CHECK(deviceDriver.queueWaitIdle(queue));
4358
4359	return tcu::TestStatus::pass("Pass");
4360}
4361
4362tcu::TestStatus createDeviceWithPromoted12Structures (Context& context)
4363{
4364	if (!context.contextSupports(vk::ApiVersion(0, 1, 2, 0)))
4365		TCU_THROW(NotSupportedError, "Vulkan 1.2 is not supported");
4366
4367	const PlatformInterface&		platformInterface	= context.getPlatformInterface();
4368	const CustomInstance			instance			(createCustomInstanceFromContext(context));
4369	const InstanceDriver&			instanceDriver		(instance.getDriver());
4370	const VkPhysicalDevice			physicalDevice		= chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
4371	const deUint32					queueFamilyIndex	= 0;
4372	const deUint32					queueCount			= 1;
4373	const deUint32					queueIndex			= 0;
4374	const float						queuePriority		= 1.0f;
4375
4376	const vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(instanceDriver, physicalDevice);
4377
4378	const VkDeviceQueueCreateInfo	deviceQueueCreateInfo =
4379	{
4380		VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
4381		DE_NULL,
4382		(VkDeviceQueueCreateFlags)0u,
4383		queueFamilyIndex,						//queueFamilyIndex;
4384		queueCount,								//queueCount;
4385		&queuePriority,							//pQueuePriorities;
4386	};
4387
4388	VkPhysicalDevice8BitStorageFeatures device8BitStorageFeatures = initVulkanStructure();
4389	VkPhysicalDeviceShaderAtomicInt64Features deviceShaderAtomicInt64Features = initVulkanStructure(&device8BitStorageFeatures);
4390	VkPhysicalDeviceShaderFloat16Int8Features deviceShaderFloat16Int8Features = initVulkanStructure(&deviceShaderAtomicInt64Features);
4391	VkPhysicalDeviceDescriptorIndexingFeatures deviceDescriptorIndexingFeatures = initVulkanStructure(&deviceShaderFloat16Int8Features);
4392	VkPhysicalDeviceScalarBlockLayoutFeatures deviceScalarBlockLayoutFeatures = initVulkanStructure(&deviceDescriptorIndexingFeatures);
4393	VkPhysicalDeviceVulkanMemoryModelFeatures deviceVulkanMemoryModelFeatures = initVulkanStructure(&deviceScalarBlockLayoutFeatures);
4394	VkPhysicalDeviceImagelessFramebufferFeatures deviceImagelessFramebufferFeatures = initVulkanStructure(&deviceVulkanMemoryModelFeatures);
4395	VkPhysicalDeviceUniformBufferStandardLayoutFeatures deviceUniformBufferStandardLayoutFeatures = initVulkanStructure(&deviceImagelessFramebufferFeatures);
4396	VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures deviceShaderSubgroupExtendedTypesFeatures = initVulkanStructure(&deviceUniformBufferStandardLayoutFeatures);
4397	VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures deviceSeparateDepthStencilLayoutsFeatures = initVulkanStructure(&deviceShaderSubgroupExtendedTypesFeatures);
4398	VkPhysicalDeviceHostQueryResetFeatures deviceHostQueryResetFeatures = initVulkanStructure(&deviceSeparateDepthStencilLayoutsFeatures);
4399	VkPhysicalDeviceTimelineSemaphoreFeatures deviceTimelineSemaphoreFeatures = initVulkanStructure(&deviceHostQueryResetFeatures);
4400	VkPhysicalDeviceBufferDeviceAddressFeatures deviceBufferDeviceAddressFeatures = initVulkanStructure(&deviceTimelineSemaphoreFeatures);
4401	VkPhysicalDeviceFeatures2 extFeatures = initVulkanStructure(&deviceBufferDeviceAddressFeatures);
4402
4403	instanceDriver.getPhysicalDeviceFeatures2 (physicalDevice, &extFeatures);
4404
4405	const VkDeviceCreateInfo		deviceCreateInfo =
4406	{
4407		VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,	//sType;
4408		&extFeatures,							//pNext;
4409		(VkDeviceCreateFlags)0u,
4410		1,										//queueRecordCount;
4411		&deviceQueueCreateInfo,					//pRequestedQueues;
4412		0,										//layerCount;
4413		DE_NULL,								//ppEnabledLayerNames;
4414		0,										//extensionCount;
4415		DE_NULL,								//ppEnabledExtensionNames;
4416		DE_NULL,								//pEnabledFeatures;
4417	};
4418
4419	const Unique<VkDevice>			device			(createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), platformInterface, instance, instanceDriver, physicalDevice, &deviceCreateInfo));
4420	const DeviceDriver				deviceDriver	(platformInterface, instance, device.get());
4421	const VkQueue					queue			= getDeviceQueue(deviceDriver, *device, queueFamilyIndex, queueIndex);
4422
4423	VK_CHECK(deviceDriver.queueWaitIdle(queue));
4424
4425	return tcu::TestStatus::pass("Pass");
4426}
4427
4428tcu::TestStatus createDeviceWithPromoted13Structures (Context& context)
4429{
4430	if (!context.contextSupports(vk::ApiVersion(0, 1, 3, 0)))
4431		TCU_THROW(NotSupportedError, "Vulkan 1.3 is not supported");
4432
4433	const PlatformInterface&		platformInterface	= context.getPlatformInterface();
4434	const CustomInstance			instance			(createCustomInstanceFromContext(context));
4435	const InstanceDriver&			instanceDriver		(instance.getDriver());
4436	const VkPhysicalDevice			physicalDevice		= chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
4437	const deUint32					queueFamilyIndex	= 0;
4438	const deUint32					queueCount			= 1;
4439	const deUint32					queueIndex			= 0;
4440	const float						queuePriority		= 1.0f;
4441
4442	const vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(instanceDriver, physicalDevice);
4443
4444	const VkDeviceQueueCreateInfo	deviceQueueCreateInfo =
4445	{
4446		VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
4447		DE_NULL,
4448		(VkDeviceQueueCreateFlags)0u,
4449		queueFamilyIndex,						//queueFamilyIndex;
4450		queueCount,								//queueCount;
4451		&queuePriority,							//pQueuePriorities;
4452	};
4453
4454	VkPhysicalDeviceShaderTerminateInvocationFeatures deviceShaderTerminateInvocationFeatures = initVulkanStructure();
4455	VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures deviceShaderDemoteToHelperInvocationFeatures = initVulkanStructure(&deviceShaderTerminateInvocationFeatures);
4456	VkPhysicalDevicePrivateDataFeatures devicePrivateDataFeatures = initVulkanStructure(&deviceShaderDemoteToHelperInvocationFeatures);
4457	VkPhysicalDevicePipelineCreationCacheControlFeatures devicePipelineCreationCacheControlFeatures = initVulkanStructure(&devicePrivateDataFeatures);
4458	VkPhysicalDeviceSynchronization2Features deviceSynchronization2Features = initVulkanStructure(&devicePipelineCreationCacheControlFeatures);
4459	VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures deviceZeroInitializeWorkgroupMemoryFeatures = initVulkanStructure(&deviceSynchronization2Features);
4460	VkPhysicalDeviceImageRobustnessFeatures deviceImageRobustnessFeatures = initVulkanStructure(&deviceZeroInitializeWorkgroupMemoryFeatures);
4461	VkPhysicalDeviceSubgroupSizeControlFeatures deviceSubgroupSizeControlFeatures = initVulkanStructure(&deviceImageRobustnessFeatures);
4462	VkPhysicalDeviceInlineUniformBlockFeatures deviceInlineUniformBlockFeatures = initVulkanStructure(&deviceSubgroupSizeControlFeatures);
4463	VkPhysicalDeviceTextureCompressionASTCHDRFeatures deviceTextureCompressionASTCHDRFeatures = initVulkanStructure(&deviceInlineUniformBlockFeatures);
4464	VkPhysicalDeviceDynamicRenderingFeatures deviceDynamicRenderingFeatures = initVulkanStructure(&deviceTextureCompressionASTCHDRFeatures);
4465	VkPhysicalDeviceShaderIntegerDotProductFeatures deviceShaderIntegerDotProductFeatures = initVulkanStructure(&deviceDynamicRenderingFeatures);
4466	VkPhysicalDeviceMaintenance4Features deviceMaintenance4Features = initVulkanStructure(&deviceShaderIntegerDotProductFeatures);
4467	VkPhysicalDeviceFeatures2 extFeatures = initVulkanStructure(&deviceMaintenance4Features);
4468
4469	instanceDriver.getPhysicalDeviceFeatures2 (physicalDevice, &extFeatures);
4470
4471	const VkDeviceCreateInfo		deviceCreateInfo =
4472	{
4473		VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,	//sType;
4474		&extFeatures,							//pNext;
4475		(VkDeviceCreateFlags)0u,
4476		1,										//queueRecordCount;
4477		&deviceQueueCreateInfo,					//pRequestedQueues;
4478		0,										//layerCount;
4479		DE_NULL,								//ppEnabledLayerNames;
4480		0,										//extensionCount;
4481		DE_NULL,								//ppEnabledExtensionNames;
4482		DE_NULL,								//pEnabledFeatures;
4483	};
4484
4485	const Unique<VkDevice>			device			(createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), platformInterface, instance, instanceDriver, physicalDevice, &deviceCreateInfo));
4486	const DeviceDriver				deviceDriver	(platformInterface, instance, device.get());
4487	const VkQueue					queue			= getDeviceQueue(deviceDriver, *device, queueFamilyIndex, queueIndex);
4488
4489	VK_CHECK(deviceDriver.queueWaitIdle(queue));
4490
4491	return tcu::TestStatus::pass("Pass");
4492}
4493
4494void addSeparateFeatureTests (tcu::TestCaseGroup* testGroup)
4495{
4496	addFunctionCase(testGroup, "private_data_features", "VkPhysicalDevicePrivateDataFeatures", testPhysicalDeviceFeaturePrivateDataFeatures);
4497	addFunctionCase(testGroup, "variable_pointers_features", "VkPhysicalDeviceVariablePointersFeatures", testPhysicalDeviceFeatureVariablePointersFeatures);
4498	addFunctionCase(testGroup, "multiview_features", "VkPhysicalDeviceMultiviewFeatures", testPhysicalDeviceFeatureMultiviewFeatures);
4499	addFunctionCase(testGroup, "present_id_features_khr", "VkPhysicalDevicePresentIdFeaturesKHR", testPhysicalDeviceFeaturePresentIdFeaturesKHR);
4500	addFunctionCase(testGroup, "present_wait_features_khr", "VkPhysicalDevicePresentWaitFeaturesKHR", testPhysicalDeviceFeaturePresentWaitFeaturesKHR);
4501	addFunctionCase(testGroup, "16_bit_storage_features", "VkPhysicalDevice16BitStorageFeatures", testPhysicalDeviceFeature16BitStorageFeatures);
4502	addFunctionCase(testGroup, "shader_subgroup_extended_types_features", "VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures", testPhysicalDeviceFeatureShaderSubgroupExtendedTypesFeatures);
4503	addFunctionCase(testGroup, "sampler_ycbcr_conversion_features", "VkPhysicalDeviceSamplerYcbcrConversionFeatures", testPhysicalDeviceFeatureSamplerYcbcrConversionFeatures);
4504	addFunctionCase(testGroup, "protected_memory_features", "VkPhysicalDeviceProtectedMemoryFeatures", testPhysicalDeviceFeatureProtectedMemoryFeatures);
4505	addFunctionCase(testGroup, "blend_operation_advanced_features_ext", "VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT", testPhysicalDeviceFeatureBlendOperationAdvancedFeaturesEXT);
4506	addFunctionCase(testGroup, "multi_draw_features_ext", "VkPhysicalDeviceMultiDrawFeaturesEXT", testPhysicalDeviceFeatureMultiDrawFeaturesEXT);
4507	addFunctionCase(testGroup, "inline_uniform_block_features", "VkPhysicalDeviceInlineUniformBlockFeatures", testPhysicalDeviceFeatureInlineUniformBlockFeatures);
4508	addFunctionCase(testGroup, "maintenance4_features", "VkPhysicalDeviceMaintenance4Features", testPhysicalDeviceFeatureMaintenance4Features);
4509	addFunctionCase(testGroup, "shader_draw_parameters_features", "VkPhysicalDeviceShaderDrawParametersFeatures", testPhysicalDeviceFeatureShaderDrawParametersFeatures);
4510	addFunctionCase(testGroup, "shader_float16_int8_features", "VkPhysicalDeviceShaderFloat16Int8Features", testPhysicalDeviceFeatureShaderFloat16Int8Features);
4511	addFunctionCase(testGroup, "host_query_reset_features", "VkPhysicalDeviceHostQueryResetFeatures", testPhysicalDeviceFeatureHostQueryResetFeatures);
4512	addFunctionCase(testGroup, "global_priority_query_features_khr", "VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR", testPhysicalDeviceFeatureGlobalPriorityQueryFeaturesKHR);
4513	addFunctionCase(testGroup, "device_memory_report_features_ext", "VkPhysicalDeviceDeviceMemoryReportFeaturesEXT", testPhysicalDeviceFeatureDeviceMemoryReportFeaturesEXT);
4514	addFunctionCase(testGroup, "descriptor_indexing_features", "VkPhysicalDeviceDescriptorIndexingFeatures", testPhysicalDeviceFeatureDescriptorIndexingFeatures);
4515	addFunctionCase(testGroup, "timeline_semaphore_features", "VkPhysicalDeviceTimelineSemaphoreFeatures", testPhysicalDeviceFeatureTimelineSemaphoreFeatures);
4516	addFunctionCase(testGroup, "8_bit_storage_features", "VkPhysicalDevice8BitStorageFeatures", testPhysicalDeviceFeature8BitStorageFeatures);
4517	addFunctionCase(testGroup, "conditional_rendering_features_ext", "VkPhysicalDeviceConditionalRenderingFeaturesEXT", testPhysicalDeviceFeatureConditionalRenderingFeaturesEXT);
4518	addFunctionCase(testGroup, "vulkan_memory_model_features", "VkPhysicalDeviceVulkanMemoryModelFeatures", testPhysicalDeviceFeatureVulkanMemoryModelFeatures);
4519	addFunctionCase(testGroup, "shader_atomic_int64_features", "VkPhysicalDeviceShaderAtomicInt64Features", testPhysicalDeviceFeatureShaderAtomicInt64Features);
4520	addFunctionCase(testGroup, "shader_atomic_float_features_ext", "VkPhysicalDeviceShaderAtomicFloatFeaturesEXT", testPhysicalDeviceFeatureShaderAtomicFloatFeaturesEXT);
4521	addFunctionCase(testGroup, "shader_atomic_float2_features_ext", "VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT", testPhysicalDeviceFeatureShaderAtomicFloat2FeaturesEXT);
4522	addFunctionCase(testGroup, "vertex_attribute_divisor_features_ext", "VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT", testPhysicalDeviceFeatureVertexAttributeDivisorFeaturesEXT);
4523	addFunctionCase(testGroup, "astc_decode_features_ext", "VkPhysicalDeviceASTCDecodeFeaturesEXT", testPhysicalDeviceFeatureASTCDecodeFeaturesEXT);
4524	addFunctionCase(testGroup, "transform_feedback_features_ext", "VkPhysicalDeviceTransformFeedbackFeaturesEXT", testPhysicalDeviceFeatureTransformFeedbackFeaturesEXT);
4525	addFunctionCase(testGroup, "mesh_shader_features_ext", "VkPhysicalDeviceMeshShaderFeaturesEXT", testPhysicalDeviceFeatureMeshShaderFeaturesEXT);
4526	addFunctionCase(testGroup, "acceleration_structure_features_khr", "VkPhysicalDeviceAccelerationStructureFeaturesKHR", testPhysicalDeviceFeatureAccelerationStructureFeaturesKHR);
4527	addFunctionCase(testGroup, "ray_tracing_pipeline_features_khr", "VkPhysicalDeviceRayTracingPipelineFeaturesKHR", testPhysicalDeviceFeatureRayTracingPipelineFeaturesKHR);
4528	addFunctionCase(testGroup, "ray_query_features_khr", "VkPhysicalDeviceRayQueryFeaturesKHR", testPhysicalDeviceFeatureRayQueryFeaturesKHR);
4529	addFunctionCase(testGroup, "ray_tracing_maintenance1_features_khr", "VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR", testPhysicalDeviceFeatureRayTracingMaintenance1FeaturesKHR);
4530	addFunctionCase(testGroup, "fragment_density_map_features_ext", "VkPhysicalDeviceFragmentDensityMapFeaturesEXT", testPhysicalDeviceFeatureFragmentDensityMapFeaturesEXT);
4531	addFunctionCase(testGroup, "fragment_density_map2_features_ext", "VkPhysicalDeviceFragmentDensityMap2FeaturesEXT", testPhysicalDeviceFeatureFragmentDensityMap2FeaturesEXT);
4532	addFunctionCase(testGroup, "scalar_block_layout_features", "VkPhysicalDeviceScalarBlockLayoutFeatures", testPhysicalDeviceFeatureScalarBlockLayoutFeatures);
4533	addFunctionCase(testGroup, "uniform_buffer_standard_layout_features", "VkPhysicalDeviceUniformBufferStandardLayoutFeatures", testPhysicalDeviceFeatureUniformBufferStandardLayoutFeatures);
4534	addFunctionCase(testGroup, "depth_clip_enable_features_ext", "VkPhysicalDeviceDepthClipEnableFeaturesEXT", testPhysicalDeviceFeatureDepthClipEnableFeaturesEXT);
4535	addFunctionCase(testGroup, "memory_priority_features_ext", "VkPhysicalDeviceMemoryPriorityFeaturesEXT", testPhysicalDeviceFeatureMemoryPriorityFeaturesEXT);
4536	addFunctionCase(testGroup, "pageable_device_local_memory_features_ext", "VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT", testPhysicalDeviceFeaturePageableDeviceLocalMemoryFeaturesEXT);
4537	addFunctionCase(testGroup, "buffer_device_address_features", "VkPhysicalDeviceBufferDeviceAddressFeatures", testPhysicalDeviceFeatureBufferDeviceAddressFeatures);
4538	addFunctionCase(testGroup, "buffer_device_address_features_ext", "VkPhysicalDeviceBufferDeviceAddressFeaturesEXT", testPhysicalDeviceFeatureBufferDeviceAddressFeaturesEXT);
4539	addFunctionCase(testGroup, "imageless_framebuffer_features", "VkPhysicalDeviceImagelessFramebufferFeatures", testPhysicalDeviceFeatureImagelessFramebufferFeatures);
4540	addFunctionCase(testGroup, "texture_compression_astchdr_features", "VkPhysicalDeviceTextureCompressionASTCHDRFeatures", testPhysicalDeviceFeatureTextureCompressionASTCHDRFeatures);
4541	addFunctionCase(testGroup, "ycbcr_image_arrays_features_ext", "VkPhysicalDeviceYcbcrImageArraysFeaturesEXT", testPhysicalDeviceFeatureYcbcrImageArraysFeaturesEXT);
4542	addFunctionCase(testGroup, "performance_query_features_khr", "VkPhysicalDevicePerformanceQueryFeaturesKHR", testPhysicalDeviceFeaturePerformanceQueryFeaturesKHR);
4543	addFunctionCase(testGroup, "shader_clock_features_khr", "VkPhysicalDeviceShaderClockFeaturesKHR", testPhysicalDeviceFeatureShaderClockFeaturesKHR);
4544	addFunctionCase(testGroup, "index_type_uint8_features_ext", "VkPhysicalDeviceIndexTypeUint8FeaturesEXT", testPhysicalDeviceFeatureIndexTypeUint8FeaturesEXT);
4545	addFunctionCase(testGroup, "fragment_shader_interlock_features_ext", "VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT", testPhysicalDeviceFeatureFragmentShaderInterlockFeaturesEXT);
4546	addFunctionCase(testGroup, "separate_depth_stencil_layouts_features", "VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures", testPhysicalDeviceFeatureSeparateDepthStencilLayoutsFeatures);
4547	addFunctionCase(testGroup, "primitive_topology_list_restart_features_ext", "VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT", testPhysicalDeviceFeaturePrimitiveTopologyListRestartFeaturesEXT);
4548	addFunctionCase(testGroup, "pipeline_executable_properties_features_khr", "VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR", testPhysicalDeviceFeaturePipelineExecutablePropertiesFeaturesKHR);
4549	addFunctionCase(testGroup, "shader_demote_to_helper_invocation_features", "VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures", testPhysicalDeviceFeatureShaderDemoteToHelperInvocationFeatures);
4550	addFunctionCase(testGroup, "texel_buffer_alignment_features_ext", "VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT", testPhysicalDeviceFeatureTexelBufferAlignmentFeaturesEXT);
4551	addFunctionCase(testGroup, "subgroup_size_control_features", "VkPhysicalDeviceSubgroupSizeControlFeatures", testPhysicalDeviceFeatureSubgroupSizeControlFeatures);
4552	addFunctionCase(testGroup, "line_rasterization_features_ext", "VkPhysicalDeviceLineRasterizationFeaturesEXT", testPhysicalDeviceFeatureLineRasterizationFeaturesEXT);
4553	addFunctionCase(testGroup, "pipeline_creation_cache_control_features", "VkPhysicalDevicePipelineCreationCacheControlFeatures", testPhysicalDeviceFeaturePipelineCreationCacheControlFeatures);
4554	addFunctionCase(testGroup, "vulkan11_features", "VkPhysicalDeviceVulkan11Features", testPhysicalDeviceFeatureVulkan11Features);
4555	addFunctionCase(testGroup, "vulkan12_features", "VkPhysicalDeviceVulkan12Features", testPhysicalDeviceFeatureVulkan12Features);
4556	addFunctionCase(testGroup, "vulkan13_features", "VkPhysicalDeviceVulkan13Features", testPhysicalDeviceFeatureVulkan13Features);
4557	addFunctionCase(testGroup, "custom_border_color_features_ext", "VkPhysicalDeviceCustomBorderColorFeaturesEXT", testPhysicalDeviceFeatureCustomBorderColorFeaturesEXT);
4558	addFunctionCase(testGroup, "border_color_swizzle_features_ext", "VkPhysicalDeviceBorderColorSwizzleFeaturesEXT", testPhysicalDeviceFeatureBorderColorSwizzleFeaturesEXT);
4559	addFunctionCase(testGroup, "extended_dynamic_state_features_ext", "VkPhysicalDeviceExtendedDynamicStateFeaturesEXT", testPhysicalDeviceFeatureExtendedDynamicStateFeaturesEXT);
4560	addFunctionCase(testGroup, "extended_dynamic_state2_features_ext", "VkPhysicalDeviceExtendedDynamicState2FeaturesEXT", testPhysicalDeviceFeatureExtendedDynamicState2FeaturesEXT);
4561	addFunctionCase(testGroup, "extended_dynamic_state3_features_ext", "VkPhysicalDeviceExtendedDynamicState3FeaturesEXT", testPhysicalDeviceFeatureExtendedDynamicState3FeaturesEXT);
4562	addFunctionCase(testGroup, "zero_initialize_workgroup_memory_features", "VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures", testPhysicalDeviceFeatureZeroInitializeWorkgroupMemoryFeatures);
4563	addFunctionCase(testGroup, "shader_subgroup_uniform_control_flow_features_khr", "VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR", testPhysicalDeviceFeatureShaderSubgroupUniformControlFlowFeaturesKHR);
4564	addFunctionCase(testGroup, "robustness2_features_ext", "VkPhysicalDeviceRobustness2FeaturesEXT", testPhysicalDeviceFeatureRobustness2FeaturesEXT);
4565	addFunctionCase(testGroup, "image_robustness_features", "VkPhysicalDeviceImageRobustnessFeatures", testPhysicalDeviceFeatureImageRobustnessFeatures);
4566	addFunctionCase(testGroup, "workgroup_memory_explicit_layout_features_khr", "VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR", testPhysicalDeviceFeatureWorkgroupMemoryExplicitLayoutFeaturesKHR);
4567	addFunctionCase(testGroup, "portability_subset_features_khr", "VkPhysicalDevicePortabilitySubsetFeaturesKHR", testPhysicalDeviceFeaturePortabilitySubsetFeaturesKHR);
4568	addFunctionCase(testGroup, "4444_formats_features_ext", "VkPhysicalDevice4444FormatsFeaturesEXT", testPhysicalDeviceFeature4444FormatsFeaturesEXT);
4569	addFunctionCase(testGroup, "shader_image_atomic_int64_features_ext", "VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT", testPhysicalDeviceFeatureShaderImageAtomicInt64FeaturesEXT);
4570	addFunctionCase(testGroup, "fragment_shading_rate_features_khr", "VkPhysicalDeviceFragmentShadingRateFeaturesKHR", testPhysicalDeviceFeatureFragmentShadingRateFeaturesKHR);
4571	addFunctionCase(testGroup, "shader_terminate_invocation_features", "VkPhysicalDeviceShaderTerminateInvocationFeatures", testPhysicalDeviceFeatureShaderTerminateInvocationFeatures);
4572	addFunctionCase(testGroup, "image2_d_view_of3_d_features_ext", "VkPhysicalDeviceImage2DViewOf3DFeaturesEXT", testPhysicalDeviceFeatureImage2DViewOf3DFeaturesEXT);
4573	addFunctionCase(testGroup, "mutable_descriptor_type_features_ext", "VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT", testPhysicalDeviceFeatureMutableDescriptorTypeFeaturesEXT);
4574	addFunctionCase(testGroup, "depth_clip_control_features_ext", "VkPhysicalDeviceDepthClipControlFeaturesEXT", testPhysicalDeviceFeatureDepthClipControlFeaturesEXT);
4575	addFunctionCase(testGroup, "vertex_input_dynamic_state_features_ext", "VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT", testPhysicalDeviceFeatureVertexInputDynamicStateFeaturesEXT);
4576	addFunctionCase(testGroup, "color_write_enable_features_ext", "VkPhysicalDeviceColorWriteEnableFeaturesEXT", testPhysicalDeviceFeatureColorWriteEnableFeaturesEXT);
4577	addFunctionCase(testGroup, "synchronization2_features", "VkPhysicalDeviceSynchronization2Features", testPhysicalDeviceFeatureSynchronization2Features);
4578	addFunctionCase(testGroup, "primitives_generated_query_features_ext", "VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT", testPhysicalDeviceFeaturePrimitivesGeneratedQueryFeaturesEXT);
4579	addFunctionCase(testGroup, "legacy_dithering_features_ext", "VkPhysicalDeviceLegacyDitheringFeaturesEXT", testPhysicalDeviceFeatureLegacyDitheringFeaturesEXT);
4580	addFunctionCase(testGroup, "multisampled_render_to_single_sampled_features_ext", "VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT", testPhysicalDeviceFeatureMultisampledRenderToSingleSampledFeaturesEXT);
4581	addFunctionCase(testGroup, "pipeline_protected_access_features_ext", "VkPhysicalDevicePipelineProtectedAccessFeaturesEXT", testPhysicalDeviceFeaturePipelineProtectedAccessFeaturesEXT);
4582	addFunctionCase(testGroup, "ycbcr2_plane444_formats_features_ext", "VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT", testPhysicalDeviceFeatureYcbcr2Plane444FormatsFeaturesEXT);
4583	addFunctionCase(testGroup, "provoking_vertex_features_ext", "VkPhysicalDeviceProvokingVertexFeaturesEXT", testPhysicalDeviceFeatureProvokingVertexFeaturesEXT);
4584	addFunctionCase(testGroup, "descriptor_buffer_features_ext", "VkPhysicalDeviceDescriptorBufferFeaturesEXT", testPhysicalDeviceFeatureDescriptorBufferFeaturesEXT);
4585	addFunctionCase(testGroup, "shader_integer_dot_product_features", "VkPhysicalDeviceShaderIntegerDotProductFeatures", testPhysicalDeviceFeatureShaderIntegerDotProductFeatures);
4586	addFunctionCase(testGroup, "fragment_shader_barycentric_features_khr", "VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR", testPhysicalDeviceFeatureFragmentShaderBarycentricFeaturesKHR);
4587	addFunctionCase(testGroup, "rgba10_x6_formats_features_ext", "VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT", testPhysicalDeviceFeatureRGBA10X6FormatsFeaturesEXT);
4588	addFunctionCase(testGroup, "dynamic_rendering_features", "VkPhysicalDeviceDynamicRenderingFeatures", testPhysicalDeviceFeatureDynamicRenderingFeatures);
4589	addFunctionCase(testGroup, "image_view_min_lod_features_ext", "VkPhysicalDeviceImageViewMinLodFeaturesEXT", testPhysicalDeviceFeatureImageViewMinLodFeaturesEXT);
4590	addFunctionCase(testGroup, "rasterization_order_attachment_access_features_ext", "VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT", testPhysicalDeviceFeatureRasterizationOrderAttachmentAccessFeaturesEXT);
4591	addFunctionCase(testGroup, "graphics_pipeline_library_features_ext", "VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT", testPhysicalDeviceFeatureGraphicsPipelineLibraryFeaturesEXT);
4592	addFunctionCase(testGroup, "shader_module_identifier_features_ext", "VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT", testPhysicalDeviceFeatureShaderModuleIdentifierFeaturesEXT);
4593	addFunctionCase(testGroup, "image_compression_control_features_ext", "VkPhysicalDeviceImageCompressionControlFeaturesEXT", testPhysicalDeviceFeatureImageCompressionControlFeaturesEXT);
4594	addFunctionCase(testGroup, "image_compression_control_swapchain_features_ext", "VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT", testPhysicalDeviceFeatureImageCompressionControlSwapchainFeaturesEXT);
4595	addFunctionCase(testGroup, "subpass_merge_feedback_features_ext", "VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT", testPhysicalDeviceFeatureSubpassMergeFeedbackFeaturesEXT);
4596	addFunctionCase(testGroup, "opacity_micromap_features_ext", "VkPhysicalDeviceOpacityMicromapFeaturesEXT", testPhysicalDeviceFeatureOpacityMicromapFeaturesEXT);
4597	addFunctionCase(testGroup, "pipeline_properties_features_ext", "VkPhysicalDevicePipelinePropertiesFeaturesEXT", testPhysicalDeviceFeaturePipelinePropertiesFeaturesEXT);
4598	addFunctionCase(testGroup, "non_seamless_cube_map_features_ext", "VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT", testPhysicalDeviceFeatureNonSeamlessCubeMapFeaturesEXT);
4599	addFunctionCase(testGroup, "pipeline_robustness_features_ext", "VkPhysicalDevicePipelineRobustnessFeaturesEXT", testPhysicalDeviceFeaturePipelineRobustnessFeaturesEXT);
4600	addFunctionCase(testGroup, "amigo_profiling_features_sec", "VkPhysicalDeviceAmigoProfilingFeaturesSEC", testPhysicalDeviceFeatureAmigoProfilingFeaturesSEC);
4601	addFunctionCase(testGroup, "attachment_feedback_loop_layout_features_ext", "VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT", testPhysicalDeviceFeatureAttachmentFeedbackLoopLayoutFeaturesEXT);
4602	addFunctionCase(testGroup, "depth_clamp_zero_one_features_ext", "VkPhysicalDeviceDepthClampZeroOneFeaturesEXT", testPhysicalDeviceFeatureDepthClampZeroOneFeaturesEXT);
4603	addFunctionCase(testGroup, "address_binding_report_features_ext", "VkPhysicalDeviceAddressBindingReportFeaturesEXT", testPhysicalDeviceFeatureAddressBindingReportFeaturesEXT);
4604	addFunctionCase(testGroup, "fault_features_ext", "VkPhysicalDeviceFaultFeaturesEXT", testPhysicalDeviceFeatureFaultFeaturesEXT);
4605	addFunctionCase(testGroup, "swapchain_maintenance1_features_ext", "VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT", testPhysicalDeviceFeatureSwapchainMaintenance1FeaturesEXT);
4606	addFunctionCase(testGroup, "create_device_with_promoted11_structures", "", createDeviceWithPromoted11Structures);
4607	addFunctionCase(testGroup, "create_device_with_promoted12_structures", "", createDeviceWithPromoted12Structures);
4608	addFunctionCase(testGroup, "create_device_with_promoted13_structures", "", createDeviceWithPromoted13Structures);
4609}
4610
4611