summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Halase <jordan@halase.me>2019-11-03 15:19:25 -0600
committerJordan Halase <jordan@halase.me>2019-11-03 15:19:25 -0600
commitfaa978ae4e9bfe02758b82895d5b0985093f55f7 (patch)
tree17ff790cebaa9912799c744e7a2ac12f2c7dd4d0
parentd57e38324f5d1c611d23f08a9c3d489be7ad01a6 (diff)
Change device function loader
-rw-r--r--main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main.c b/main.c
index db10000..fc90146 100644
--- a/main.c
+++ b/main.c
@@ -839,24 +839,21 @@ static int rvkLoadDeviceFunctions(struct RenderVulkan *vk, VkDevice device)
const char *const strErrLd = "Error loading device function %s";
static const char *const _vkDestroyDevice = "vkDestroyDevice";
- uintptr_t *__vkDestroyDevice = (uintptr_t*)&vk->dev->vkDestroyDevice;
- *__vkDestroyDevice = (uintptr_t)vk->api->vkGetDeviceProcAddr(device, _vkDestroyDevice);
+ vk->dev->vkDestroyDevice = (PFN_vkDestroyDevice)vk->api->vkGetDeviceProcAddr(device, _vkDestroyDevice);
if (!vk->dev->vkDestroyDevice) {
rvkSetErrMsg(vk, strErrLd, _vkDestroyDevice);
return -1;
}
static const char *const _vkDeviceWaitIdle = "vkDeviceWaitIdle";
- uintptr_t *__vkDeviceWaitIdle = (uintptr_t*)&vk->dev->vkDeviceWaitIdle;
- *__vkDeviceWaitIdle = (uintptr_t)vk->api->vkGetDeviceProcAddr(device, _vkDeviceWaitIdle);
+ vk->dev->vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle)vk->api->vkGetDeviceProcAddr(device, _vkDeviceWaitIdle);
if (!vk->dev->vkDeviceWaitIdle) {
rvkSetErrMsg(vk, strErrLd, _vkDeviceWaitIdle);
return -1;
}
static const char *const _vkGetDeviceQueue = "vkGetDeviceQueue";
- uintptr_t *__vkGetDeviceQueue = (uintptr_t*)&vk->dev->vkGetDeviceQueue;
- *__vkGetDeviceQueue = (uintptr_t)vk->api->vkGetDeviceProcAddr(device, _vkGetDeviceQueue);
+ vk->dev->vkGetDeviceQueue = (PFN_vkGetDeviceQueue)vk->api->vkGetDeviceProcAddr(device, _vkGetDeviceQueue);
if (!vk->dev->vkGetDeviceQueue) {
rvkSetErrMsg(vk, strErrLd, _vkGetDeviceQueue);
return -1;