bug 14362: VK_NULL_HANDLE does not work in C (WIP)
Drop type safety on 32-bit.
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14362
diff --git a/demos/cube.c b/demos/cube.c
index b64023f..22a925f 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -438,7 +438,7 @@
assert(!err);
const VkCmdBuffer cmd_bufs[] = { demo->cmd };
- VkFence nullFence = { VK_NULL_HANDLE };
+ VkFence nullFence = VK_NULL_HANDLE;
VkSubmitInfo submit_info = {
.waitSemCount = 0,
.pWaitSemaphores = NULL,
@@ -483,9 +483,9 @@
.sType = VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO,
.pNext = NULL,
.flags = 0,
- .renderPass = { VK_NULL_HANDLE },
+ .renderPass = VK_NULL_HANDLE,
.subpass = 0,
- .framebuffer = { VK_NULL_HANDLE },
+ .framebuffer = VK_NULL_HANDLE,
};
err = vkBeginCommandBuffer(demo->cmd, &cmd_buf_info);
assert(!err);
@@ -526,9 +526,9 @@
.sType = VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO,
.pNext = NULL,
.flags = 0,
- .renderPass = { VK_NULL_HANDLE },
+ .renderPass = VK_NULL_HANDLE,
.subpass = 0,
- .framebuffer = { VK_NULL_HANDLE },
+ .framebuffer = VK_NULL_HANDLE,
};
const VkClearValue clear_values[2] = {
[0] = { .color.float32 = { 0.2f, 0.2f, 0.2f, 0.2f } },
@@ -631,7 +631,7 @@
.pNext = NULL,
.flags = 0,
};
- VkFence nullFence = { VK_NULL_HANDLE };
+ VkFence nullFence = VK_NULL_HANDLE;
err = vkCreateSemaphore(demo->device,
&presentCompleteSemaphoreCreateInfo,
@@ -816,7 +816,7 @@
// swapchain at this point.
// Note: destroying the swapchain also cleans up all its associated
// presentable images once the platform is done with them.
- if (oldSwapchain.handle != VK_NULL_HANDLE) {
+ if (oldSwapchain != VK_NULL_HANDLE) {
demo->fpDestroySwapchainKHR(demo->device, oldSwapchain);
}
@@ -894,7 +894,7 @@
VkImageViewCreateInfo view = {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.pNext = NULL,
- .image.handle = VK_NULL_HANDLE,
+ .image = VK_NULL_HANDLE,
.format = depth_format,
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT,
@@ -1187,7 +1187,7 @@
VkImageViewCreateInfo view = {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.pNext = NULL,
- .image.handle = VK_NULL_HANDLE,
+ .image = VK_NULL_HANDLE,
.viewType = VK_IMAGE_VIEW_TYPE_2D,
.format = tex_format,
.channels = { VK_CHANNEL_SWIZZLE_R,