Compiles, but validation errors prevent it from running
This commit is contained in:
parent
5308e0777b
commit
d5d8dc50e4
@ -83,11 +83,11 @@ namespace vkinit {
|
||||
uint32_t queueFamilyIndex,
|
||||
VkCommandPoolCreateFlags flags
|
||||
) {
|
||||
VkCommandPoolCreateInfo info = {
|
||||
VkCommandPoolCreateInfo info {
|
||||
.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.queueFamilyIndex = queueFamilyIndex,
|
||||
.flags = flags
|
||||
.flags = flags,
|
||||
.queueFamilyIndex = queueFamilyIndex
|
||||
};
|
||||
return info;
|
||||
}
|
||||
@ -96,12 +96,12 @@ namespace vkinit {
|
||||
VkCommandPool pool,
|
||||
uint32_t count
|
||||
) {
|
||||
VkCommandBufferAllocateInfo info = {
|
||||
VkCommandBufferAllocateInfo info {
|
||||
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.commandPool = pool,
|
||||
.commandBufferCount = count,
|
||||
.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY
|
||||
.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
|
||||
.commandBufferCount = count
|
||||
};
|
||||
return info;
|
||||
}
|
||||
@ -109,10 +109,10 @@ namespace vkinit {
|
||||
VkFenceCreateInfo fenceCreateInfo(
|
||||
VkFenceCreateFlags flags /*= 0 */
|
||||
) {
|
||||
VkFenceCreateInfo info = {
|
||||
VkFenceCreateInfo info {
|
||||
.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = flags;
|
||||
.flags = flags
|
||||
};
|
||||
|
||||
return info;
|
||||
@ -121,7 +121,7 @@ namespace vkinit {
|
||||
VkSemaphoreCreateInfo semaphoreCreateInfo (
|
||||
VkSemaphoreCreateFlags flags /*= 0*/
|
||||
) {
|
||||
VkSemaphoreCreateInfo info = {
|
||||
VkSemaphoreCreateInfo info {
|
||||
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
.flags = flags,
|
||||
@ -133,12 +133,13 @@ namespace vkinit {
|
||||
VkCommandBufferBeginInfo commandBufferBeginInfo (
|
||||
VkCommandBufferUsageFlags flags /*= 0*/
|
||||
) {
|
||||
VkCommandBufferBeginInfo info = {
|
||||
VkCommandBufferBeginInfo info {
|
||||
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
|
||||
.pNext = nullptr,
|
||||
|
||||
.pInheritanceInfo = nullptr,
|
||||
.flags = flags
|
||||
.flags = flags,
|
||||
.pInheritanceInfo = nullptr
|
||||
|
||||
};
|
||||
|
||||
return info;
|
||||
@ -162,13 +163,13 @@ namespace vkinit {
|
||||
VkPipelineStageFlags2 stageMask,
|
||||
VkSemaphore semaphore
|
||||
) {
|
||||
VkSemaphoreSubmitInfo submitInfo{
|
||||
VkSemaphoreSubmitInfo submitInfo {
|
||||
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO,
|
||||
.pNext = nullptr,
|
||||
.semaphore = semaphore,
|
||||
.value = 1,
|
||||
.stageMask = stageMask,
|
||||
.deviceIndex = 0,
|
||||
.value = 1
|
||||
.deviceIndex = 0
|
||||
};
|
||||
|
||||
return submitInfo;
|
||||
@ -192,18 +193,18 @@ namespace vkinit {
|
||||
VkSemaphoreSubmitInfo* signalSemaphoreInfo,
|
||||
VkSemaphoreSubmitInfo* waitSemaphoreInfo
|
||||
) {
|
||||
VkSubmitInfo2 info = {
|
||||
VkSubmitInfo2 info {
|
||||
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2,
|
||||
.pNext = nullptr,
|
||||
|
||||
.waitSemaphoreInfoCount = waitSemaphoreInfo == nullptr ? 0 : 1,
|
||||
.waitSemaphoreInfoCount = static_cast<uint32_t>(waitSemaphoreInfo == nullptr ? 0 : 1),
|
||||
.pWaitSemaphoreInfos = waitSemaphoreInfo,
|
||||
|
||||
.signalSemaphoreInfoCount = signalSemaphoreInfo == nullptr ? 0 : 1,
|
||||
.pSignalSemaphoreInfos = signalSemaphoreInfo,
|
||||
|
||||
.commandBufferInfoCount = 1,
|
||||
.pCommandBufferInfos = cmd
|
||||
.pCommandBufferInfos = cmd,
|
||||
|
||||
.signalSemaphoreInfoCount = static_cast<uint32_t>(signalSemaphoreInfo == nullptr ? 0 : 1),
|
||||
.pSignalSemaphoreInfos = signalSemaphoreInfo
|
||||
};
|
||||
|
||||
return info;
|
||||
@ -302,8 +303,6 @@ namespace vkinit {
|
||||
};
|
||||
return renderInfo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user