aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Elliott <ianelliott@google.com>2015-11-23 12:48:15 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-01 10:18:23 -0700
commitf2ff802d1af526821fd81fab779eddadffae017a (patch)
treee40617e77fafc00fc7f430a4c703453b707ae9ba
parent5e6d9f797ca3d2e25c2563e74125256320643768 (diff)
downloadusermoji-f2ff802d1af526821fd81fab779eddadffae017a.tar.xz
demos: Some cleanup, including calling GIPA.
Includes Calling GIPA instead of GDPA for functions that moved to instance extension.
-rw-r--r--demos/cube.c21
-rw-r--r--demos/tri.c15
2 files changed, 19 insertions, 17 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 66e7245e..851ef6ba 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -2405,9 +2405,9 @@ static void demo_init_vk(struct demo *demo)
free(device_layers);
GET_INSTANCE_PROC_ADDR(demo->inst, GetPhysicalDeviceSurfaceSupportKHR);
- GET_DEVICE_PROC_ADDR(demo->device, GetPhysicalDeviceSurfaceCapabilitiesKHR);
- GET_DEVICE_PROC_ADDR(demo->device, GetPhysicalDeviceSurfaceFormatsKHR);
- GET_DEVICE_PROC_ADDR(demo->device, GetPhysicalDeviceSurfacePresentModesKHR);
+ GET_INSTANCE_PROC_ADDR(demo->inst, GetPhysicalDeviceSurfaceCapabilitiesKHR);
+ GET_INSTANCE_PROC_ADDR(demo->inst, GetPhysicalDeviceSurfaceFormatsKHR);
+ GET_INSTANCE_PROC_ADDR(demo->inst, GetPhysicalDeviceSurfacePresentModesKHR);
GET_DEVICE_PROC_ADDR(demo->device, CreateSwapchainKHR);
GET_DEVICE_PROC_ADDR(demo->device, DestroySwapchainKHR);
GET_DEVICE_PROC_ADDR(demo->device, GetSwapchainImagesKHR);
@@ -2474,9 +2474,10 @@ static void demo_init_vk_swapchain(struct demo *demo)
}
// TODO: Add support for separate queues, including presentation,
- // synchronization, and appropriate tracking for QueueSubmit
- // While it is possible for an application to use a separate graphics and a
- // present queues, this demo program assumes it is only using one:
+ // synchronization, and appropriate tracking for QueueSubmit.
+ // NOTE: While it is possible for an application to use a separate graphics
+ // and a present queues, this demo program assumes it is only using
+ // one:
if (graphicsQueueNodeIndex != presentQueueNodeIndex) {
ERR_EXIT("Could not find a common graphics and a present queue\n",
"Swapchain Initialization Failure");
@@ -2490,14 +2491,14 @@ static void demo_init_vk_swapchain(struct demo *demo)
// Get the list of VkFormat's that are supported:
uint32_t formatCount;
err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu,
- demo->surface,
- &formatCount, NULL);
+ demo->surface,
+ &formatCount, NULL);
assert(!err);
VkSurfaceFormatKHR *surfFormats =
(VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR));
err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu,
- demo->surface,
- &formatCount, surfFormats);
+ demo->surface,
+ &formatCount, surfFormats);
assert(!err);
// If the format list includes just one entry of VK_FORMAT_UNDEFINED,
// the surface has no preferred format. Otherwise, at least one
diff --git a/demos/tri.c b/demos/tri.c
index b9aeaabf..64bfe9ac 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -2046,9 +2046,10 @@ static void demo_init_vk_swapchain(struct demo *demo)
}
// TODO: Add support for separate queues, including presentation,
- // synchronization, and appropriate tracking for QueueSubmit
- // While it is possible for an application to use a separate graphics and a
- // present queues, this demo program assumes it is only using one:
+ // synchronization, and appropriate tracking for QueueSubmit.
+ // NOTE: While it is possible for an application to use a separate graphics
+ // and a present queues, this demo program assumes it is only using
+ // one:
if (graphicsQueueNodeIndex != presentQueueNodeIndex) {
ERR_EXIT("Could not find a common graphics and a present queue\n",
"Swapchain Initialization Failure");
@@ -2062,14 +2063,14 @@ static void demo_init_vk_swapchain(struct demo *demo)
// Get the list of VkFormat's that are supported:
uint32_t formatCount;
err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu,
- demo->surface,
- &formatCount, NULL);
+ demo->surface,
+ &formatCount, NULL);
assert(!err);
VkSurfaceFormatKHR *surfFormats =
(VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR));
err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu,
- demo->surface,
- &formatCount, surfFormats);
+ demo->surface,
+ &formatCount, surfFormats);
assert(!err);
// If the format list includes just one entry of VK_FORMAT_UNDEFINED,
// the surface has no preferred format. Otherwise, at least one