Mesa (master): radv: rename global extension properties structs
Bas Nieuwenhuizen
bnieuwenhuizen at kemper.freedesktop.org
Sat Jan 14 13:25:52 UTC 2017
Module: Mesa
Branch: master
Commit: 5323efb685634341df10f7f5b2fe37a0a2ca5e52
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5323efb685634341df10f7f5b2fe37a0a2ca5e52
Author: Andres Rodriguez <andresx7 at gmail.com>
Date: Fri Jan 13 18:44:16 2017 -0500
radv: rename global extension properties structs
All extension arrays are global, but only one of them refers to instance
extensions.
The device extension array refers to extensions that are common across
all physical devices. This disctinction will be more imporant once we
have dynamic extension support for devices.
Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/vulkan/radv_device.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 99c56a4..e0991d4 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -147,7 +147,7 @@ radv_physical_device_finish(struct radv_physical_device *device)
device->ws->destroy(device->ws);
}
-static const VkExtensionProperties global_extensions[] = {
+static const VkExtensionProperties instance_extensions[] = {
{
.extensionName = VK_KHR_SURFACE_EXTENSION_NAME,
.specVersion = 25,
@@ -172,7 +172,7 @@ static const VkExtensionProperties global_extensions[] = {
#endif
};
-static const VkExtensionProperties device_extensions[] = {
+static const VkExtensionProperties common_device_extensions[] = {
{
.extensionName = VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,
.specVersion = 1,
@@ -258,9 +258,9 @@ VkResult radv_CreateInstance(
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
bool found = false;
- for (uint32_t j = 0; j < ARRAY_SIZE(global_extensions); j++) {
+ for (uint32_t j = 0; j < ARRAY_SIZE(instance_extensions); j++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
- global_extensions[j].extensionName) == 0) {
+ instance_extensions[j].extensionName) == 0) {
found = true;
break;
}
@@ -697,9 +697,9 @@ VkResult radv_CreateDevice(
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
bool found = false;
- for (uint32_t j = 0; j < ARRAY_SIZE(device_extensions); j++) {
+ for (uint32_t j = 0; j < ARRAY_SIZE(common_device_extensions); j++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i],
- device_extensions[j].extensionName) == 0) {
+ common_device_extensions[j].extensionName) == 0) {
found = true;
break;
}
@@ -826,14 +826,14 @@ VkResult radv_EnumerateInstanceExtensionProperties(
VkExtensionProperties* pProperties)
{
if (pProperties == NULL) {
- *pPropertyCount = ARRAY_SIZE(global_extensions);
+ *pPropertyCount = ARRAY_SIZE(instance_extensions);
return VK_SUCCESS;
}
- *pPropertyCount = MIN2(*pPropertyCount, ARRAY_SIZE(global_extensions));
- typed_memcpy(pProperties, global_extensions, *pPropertyCount);
+ *pPropertyCount = MIN2(*pPropertyCount, ARRAY_SIZE(instance_extensions));
+ typed_memcpy(pProperties, instance_extensions, *pPropertyCount);
- if (*pPropertyCount < ARRAY_SIZE(global_extensions))
+ if (*pPropertyCount < ARRAY_SIZE(instance_extensions))
return VK_INCOMPLETE;
return VK_SUCCESS;
@@ -846,14 +846,14 @@ VkResult radv_EnumerateDeviceExtensionProperties(
VkExtensionProperties* pProperties)
{
if (pProperties == NULL) {
- *pPropertyCount = ARRAY_SIZE(device_extensions);
+ *pPropertyCount = ARRAY_SIZE(common_device_extensions);
return VK_SUCCESS;
}
- *pPropertyCount = MIN2(*pPropertyCount, ARRAY_SIZE(device_extensions));
- typed_memcpy(pProperties, device_extensions, *pPropertyCount);
+ *pPropertyCount = MIN2(*pPropertyCount, ARRAY_SIZE(common_device_extensions));
+ typed_memcpy(pProperties, common_device_extensions, *pPropertyCount);
- if (*pPropertyCount < ARRAY_SIZE(device_extensions))
+ if (*pPropertyCount < ARRAY_SIZE(common_device_extensions))
return VK_INCOMPLETE;
return VK_SUCCESS;
More information about the mesa-commit
mailing list