aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-04-16 10:04:35 -0600
committerTobin Ehlis <tobin@lunarg.com>2015-04-16 12:39:27 -0600
commit7537db97c30e73648d2d8270451b4d0b06b13693 (patch)
tree7d9924ea64eae71ff65b91c9151a3a6707cd68a4
parent928989197098f7facfc324f98cff6f6d419f73ed (diff)
downloadusermoji-7537db97c30e73648d2d8270451b4d0b06b13693.tar.xz
demos: Remove use of GetExtensionSupport API that's going away
-rw-r--r--demos/cube.c10
-rw-r--r--demos/tri.c8
-rw-r--r--demos/vulkaninfo.c12
3 files changed, 15 insertions, 15 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 637cd312..13fc1dbd 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -1664,6 +1664,7 @@ static void demo_create_window(struct demo *demo)
static void demo_init_vk(struct demo *demo)
{
+ // TODO : Should query count w/ GetGlobalExtensionInfo, then enable via CreateInstance
const VkApplicationInfo app = {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pNext = NULL,
@@ -1690,15 +1691,17 @@ static void demo_init_vk(struct demo *demo)
.queueNodeIndex = 0,
.queueCount = 1,
};
+
const char *ext_names[] = {
"VK_WSI_X11",
};
+
const VkDeviceCreateInfo device = {
.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
.pNext = NULL,
.queueRecordCount = 1,
.pRequestedQueues = &queue,
- .extensionCount = 1,
+ .extensionCount = 1, // TODO : Should query count w/ GetGlobalExtensionInfo
.ppEnabledExtensionNames = ext_names,
.flags = VK_DEVICE_CREATE_VALIDATION_BIT,
};
@@ -1721,11 +1724,6 @@ static void demo_init_vk(struct demo *demo)
err = vkEnumerateGpus(demo->inst, 1, &gpu_count, &demo->gpu);
assert(!err && gpu_count == 1);
- for (i = 0; i < device.extensionCount; i++) {
- err = vkGetExtensionSupport(demo->gpu, ext_names[i]);
- assert(!err);
- }
-
err = vkWsiX11AssociateConnection(demo->gpu, &connection);
assert(!err);
diff --git a/demos/tri.c b/demos/tri.c
index f1156d28..299d36b4 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -1205,6 +1205,7 @@ static void demo_create_window(struct demo *demo)
static void demo_init_vk(struct demo *demo)
{
+ // TODO : Should query count w/ GetGlobalExtensionInfo, then enable via CreateInstance
const VkApplicationInfo app = {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pNext = NULL,
@@ -1239,7 +1240,7 @@ static void demo_init_vk(struct demo *demo)
.pNext = NULL,
.queueRecordCount = 1,
.pRequestedQueues = &queue,
- .extensionCount = 1,
+ .extensionCount = 1, // TODO : Should query count w/ GetGlobalExtensionInfo
.ppEnabledExtensionNames = ext_names,
.flags = VK_DEVICE_CREATE_VALIDATION_BIT,
};
@@ -1262,11 +1263,6 @@ static void demo_init_vk(struct demo *demo)
err = vkEnumerateGpus(demo->inst, 1, &gpu_count, &demo->gpu);
assert(!err && gpu_count == 1);
- for (i = 0; i < device.extensionCount; i++) {
- err = vkGetExtensionSupport(demo->gpu, ext_names[i]);
- assert(!err);
- }
-
err = vkWsiX11AssociateConnection(demo->gpu, &connection);
assert(!err);
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index 316a6602..2966dfd1 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -364,17 +364,21 @@ static void app_dev_destroy(struct app_dev *dev)
static void app_gpu_init_extensions(struct app_gpu *gpu)
{
- VkResult err;
+ //VkResult err;
uint32_t i;
+ // TODO : Should query count w/ GetGlobalExtensionInfo,
+ // Then dynamically set extensions based on returned count
static char *known_extensions[] = {
"VK_WSI_X11",
};
for (i = 0; i < ARRAY_SIZE(known_extensions); i++) {
+/*
err = vkGetExtensionSupport(gpu->obj, known_extensions[i]);
if (!err)
- gpu->extension_count++;
+*/
+ gpu->extension_count++;
}
gpu->extensions =
@@ -384,9 +388,11 @@ static void app_gpu_init_extensions(struct app_gpu *gpu)
gpu->extension_count = 0;
for (i = 0; i < ARRAY_SIZE(known_extensions); i++) {
+/*
err = vkGetExtensionSupport(gpu->obj, known_extensions[i]);
if (!err)
- gpu->extensions[gpu->extension_count++] = known_extensions[i];
+*/
+ gpu->extensions[gpu->extension_count++] = known_extensions[i];
}
}