barrier on ouput device
This commit is contained in:
@@ -85,6 +85,9 @@ gnReturnCode createOutputDevice(gnOutputDeviceHandle outputDevice, gnInstanceHan
|
|||||||
free(queueCreateInfos);
|
free(queueCreateInfos);
|
||||||
free(queueFamilies);
|
free(queueFamilies);
|
||||||
|
|
||||||
|
VkFenceCreateInfo fenceInfo = { .sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO };
|
||||||
|
if (vkCreateFence(outputDevice->outputDevice->device, &fenceInfo, NULL, &outputDevice->outputDevice->barrierFence) != VK_SUCCESS) return GN_FAILED_TO_CREATE_FENCE;
|
||||||
|
|
||||||
// create the massive staging buffer
|
// create the massive staging buffer
|
||||||
outputDevice->outputDevice->stagingBufferSize = 128 * 1024 * 1024;
|
outputDevice->outputDevice->stagingBufferSize = 128 * 1024 * 1024;
|
||||||
gnReturnCode code = VkCreateBuffer(
|
gnReturnCode code = VkCreateBuffer(
|
||||||
@@ -101,6 +104,7 @@ void waitForDevice(const gnOutputDeviceHandle device) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void destroyOutputDevice(gnOutputDeviceHandle device) {
|
void destroyOutputDevice(gnOutputDeviceHandle device) {
|
||||||
|
vkDestroyFence(device->outputDevice->device, device->outputDevice->barrierFence, NULL);
|
||||||
gnDestroyVulkanBuffer(&device->outputDevice->stagingBuffer, device->outputDevice->device);
|
gnDestroyVulkanBuffer(&device->outputDevice->stagingBuffer, device->outputDevice->device);
|
||||||
vkDestroyCommandPool(device->outputDevice->device, device->outputDevice->transferCommandPool, NULL);
|
vkDestroyCommandPool(device->outputDevice->device, device->outputDevice->transferCommandPool, NULL);
|
||||||
vkDestroyDevice(device->outputDevice->device, NULL);
|
vkDestroyDevice(device->outputDevice->device, NULL);
|
||||||
|
@@ -14,6 +14,8 @@ typedef struct gnPlatformOutputDevice_t {
|
|||||||
VkGryphnBuffer stagingBuffer;
|
VkGryphnBuffer stagingBuffer;
|
||||||
VkDeviceSize stagingBufferSize;
|
VkDeviceSize stagingBufferSize;
|
||||||
|
|
||||||
|
VkFence barrierFence;
|
||||||
|
|
||||||
gnBool enabledOversizedDescriptorPools;
|
gnBool enabledOversizedDescriptorPools;
|
||||||
} gnPlatformOutputDevice;
|
} gnPlatformOutputDevice;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user