diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-07-07 12:05:28 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-07-17 09:11:23 -0600 |
| commit | b25a8ac0588042daee94f911578047113a9f3b14 (patch) | |
| tree | 137a505bf3df90e959672daa2993a8687a48378a /layers/parameter_validation.cpp | |
| parent | e86124c2c2dedff81121e56c84783538c1236ae9 (diff) | |
| download | usermoji-b25a8ac0588042daee94f911578047113a9f3b14.tar.xz | |
layers: GH1933, Check for mutually exclusive exts
Add check for Maintenance1 and negative_viewport_height extensions being
enabled simultaneously, along with test and a database update.
Change-Id: Id44f2a322fd32883d8b6d7ff1dab56996dec76c7
Diffstat (limited to 'layers/parameter_validation.cpp')
| -rw-r--r-- | layers/parameter_validation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index e5a12941..c0f81d18 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -438,13 +438,27 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi } } + bool maint1 = false; + bool negative_viewport = false; + if ((pCreateInfo->enabledExtensionCount > 0) && (pCreateInfo->ppEnabledExtensionNames != NULL)) { for (size_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { skip |= validate_string(instance_data->report_data, "vkCreateDevice", "pCreateInfo->ppEnabledExtensionNames", pCreateInfo->ppEnabledExtensionNames[i]); + if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_MAINTENANCE1_EXTENSION_NAME) == 0) maint1 = true; + if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME) == 0) + negative_viewport = true; } } + if (maint1 && negative_viewport) { + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_056002ec, LayerName, + "VkDeviceCreateInfo->ppEnabledExtensionNames must not simultaneously include VK_KHR_maintenance1 and " + "VK_AMD_negative_viewport_height. %s", + validation_error_map[VALIDATION_ERROR_056002ec]); + } + if (pCreateInfo->pNext != NULL && pCreateInfo->pEnabledFeatures) { // Check for get_physical_device_properties2 struct struct std_header { |
