-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e31af7
commit 601d593
Showing
11 changed files
with
188 additions
and
168 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "VkDescriptorPool.h" | ||
|
||
namespace Vixen::Vk { | ||
VkDescriptorPool::VkDescriptorPool( | ||
const std::shared_ptr<Device>& device, | ||
const std::vector<VkDescriptorPoolSize>& sizes, | ||
const uint32_t maxSets | ||
) : device(device), | ||
pool(VK_NULL_HANDLE) { | ||
const VkDescriptorPoolCreateInfo info{ | ||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | ||
.pNext = nullptr, | ||
.flags = 0, | ||
.maxSets = maxSets, | ||
.poolSizeCount = static_cast<uint32_t>(sizes.size()), | ||
.pPoolSizes = sizes.data() | ||
}; | ||
|
||
checkVulkanResult( | ||
vkCreateDescriptorPool(device->getDevice(), &info, nullptr, &pool), | ||
"Failed to create descriptor pool" | ||
); | ||
} | ||
|
||
VkDescriptorPool::~VkDescriptorPool() { | ||
vkDestroyDescriptorPool(device->getDevice(), pool, nullptr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include "Device.h" | ||
|
||
namespace Vixen::Vk { | ||
class VkDescriptorPool { | ||
std::shared_ptr<Device> device; | ||
|
||
::VkDescriptorPool pool; | ||
|
||
public: | ||
VkDescriptorPool( | ||
const std::shared_ptr<Device>& device, | ||
const std::vector<VkDescriptorPoolSize>& sizes, | ||
uint32_t maxSets | ||
); | ||
|
||
VkDescriptorPool(const VkDescriptorPool& other) = delete; | ||
|
||
VkDescriptorPool(VkDescriptorPool&& other) noexcept = delete; | ||
|
||
VkDescriptorPool& operator=(VkDescriptorPool other) = delete; | ||
|
||
~VkDescriptorPool(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "VkDescriptorSetLayout.h" | ||
|
||
namespace Vixen::Vk { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include "Device.h" | ||
|
||
namespace Vixen::Vk { | ||
class VkDescriptorSetLayout { | ||
public: | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.