Fix viewports not rendering when index == nullptr
This commit is contained in:
parent
9c83375ed0
commit
3f2be1e26a
2 changed files with 6 additions and 5 deletions
|
@ -2071,10 +2071,9 @@ void GFXVulkan::createDescriptorPool() {
|
||||||
|
|
||||||
VkDescriptorPoolCreateInfo poolInfo = {};
|
VkDescriptorPoolCreateInfo poolInfo = {};
|
||||||
poolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
|
poolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
|
||||||
poolInfo.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
|
|
||||||
poolInfo.poolSizeCount = static_cast<uint32_t>(poolSizes.size());
|
poolInfo.poolSizeCount = static_cast<uint32_t>(poolSizes.size());
|
||||||
poolInfo.pPoolSizes = poolSizes.data();
|
poolInfo.pPoolSizes = poolSizes.data();
|
||||||
poolInfo.maxSets = 15000;
|
poolInfo.maxSets = 1500;
|
||||||
|
|
||||||
vkCreateDescriptorPool(device, &poolInfo, nullptr, &descriptorPool);
|
vkCreateDescriptorPool(device, &poolInfo, nullptr, &descriptorPool);
|
||||||
}
|
}
|
||||||
|
@ -2123,9 +2122,11 @@ void GFXVulkan::cacheDescriptorState(GFXVulkanPipeline* pipeline, VkDescriptorSe
|
||||||
|
|
||||||
VkResult error = vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet);
|
VkResult error = vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet);
|
||||||
if(error != VK_SUCCESS || descriptorSet == VK_NULL_HANDLE) {
|
if(error != VK_SUCCESS || descriptorSet == VK_NULL_HANDLE) {
|
||||||
prism::log("ERROR: COULD NOT CACHE BECAUSE OUT OF DESCRIPTOR SETS.");
|
prism::log("ERROR: no cache");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
prism::log("Allocated new descriptor set.");
|
||||||
}
|
}
|
||||||
|
|
||||||
name_object(device, VK_OBJECT_TYPE_DESCRIPTOR_SET, (uint64_t)descriptorSet, pipeline->label);
|
name_object(device, VK_OBJECT_TYPE_DESCRIPTOR_SET, (uint64_t)descriptorSet, pipeline->label);
|
||||||
|
|
|
@ -181,7 +181,7 @@ void renderer::render(GFXCommandBuffer* commandbuffer, Scene* scene, RenderTarge
|
||||||
const auto extent = target.extent;
|
const auto extent = target.extent;
|
||||||
const auto render_extent = target.get_render_extent();
|
const auto render_extent = target.get_render_extent();
|
||||||
|
|
||||||
if(!platform::is_main_window(index)) {
|
if(index != nullptr && !platform::is_main_window(index)) {
|
||||||
GFXRenderPassBeginInfo beginInfo = {};
|
GFXRenderPassBeginInfo beginInfo = {};
|
||||||
beginInfo.render_area.extent = render_extent;
|
beginInfo.render_area.extent = render_extent;
|
||||||
|
|
||||||
|
|
Reference in a new issue