Win32 vulkan window
This commit is contained in:
parent
415e523a45
commit
b5e69c90fa
12 changed files with 950 additions and 85 deletions
|
|
@ -117,6 +117,40 @@ export namespace Crafter {
|
|||
|
||||
return types;
|
||||
}
|
||||
|
||||
template <typename... Shaders>
|
||||
constexpr static std::vector<VkDescriptorPoolSize> GetPoolSizesCombined(const std::span<const DescriptorSetLayoutVulkan> shaders) {
|
||||
std::vector<VkDescriptorPoolSize> types;
|
||||
|
||||
for(const DescriptorSetLayoutVulkan& shader : shaders) {
|
||||
for (const VkDescriptorSetLayoutBinding& binding : shader.descriptors) {
|
||||
for(VkDescriptorPoolSize& type : types) {
|
||||
if(type.type == binding.descriptorType) {
|
||||
type.descriptorCount += binding.descriptorCount;
|
||||
goto inner;
|
||||
}
|
||||
}
|
||||
types.emplace_back(binding.descriptorType, binding.descriptorCount);
|
||||
inner:;
|
||||
}
|
||||
}
|
||||
|
||||
([&] {
|
||||
for (const VkDescriptorSetLayoutBinding& binding : Shaders::descriptors) {
|
||||
for(VkDescriptorPoolSize& type : types) {
|
||||
if(type.type == binding.descriptorType) {
|
||||
type.descriptorCount += binding.descriptorCount;
|
||||
goto inner2;
|
||||
}
|
||||
}
|
||||
types.emplace_back(binding.descriptorType, binding.descriptorCount);
|
||||
inner2:;
|
||||
}
|
||||
}(),
|
||||
...);
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
public:
|
||||
void BuildPool(std::span<const VkDescriptorPoolSize> poolSizes, std::span<const VkDescriptorSetLayout> setLayouts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue