vk: bump max number of compute jobs from 120 to 1024
- It is possible without bugs to have a very high number of compute invocations.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "VKHelpers.h"
|
#include "VKHelpers.h"
|
||||||
|
|
||||||
|
#define VK_MAX_COMPUTE_TASKS 1024 // Max number of jobs per frame
|
||||||
|
|
||||||
namespace vk
|
namespace vk
|
||||||
{
|
{
|
||||||
struct compute_task
|
struct compute_task
|
||||||
@@ -24,7 +26,7 @@ namespace vk
|
|||||||
{
|
{
|
||||||
VkDescriptorPoolSize descriptor_pool_sizes[1] =
|
VkDescriptorPoolSize descriptor_pool_sizes[1] =
|
||||||
{
|
{
|
||||||
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 120 },
|
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_MAX_COMPUTE_TASKS },
|
||||||
};
|
};
|
||||||
|
|
||||||
//Reserve descriptor pools
|
//Reserve descriptor pools
|
||||||
@@ -134,7 +136,7 @@ namespace vk
|
|||||||
m_program = std::make_unique<vk::glsl::program>(*get_current_renderer(), pipeline, inputs, inputs);
|
m_program = std::make_unique<vk::glsl::program>(*get_current_renderer(), pipeline, inputs, inputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
verify(HERE), m_used_descriptors < 120;
|
verify(HERE), m_used_descriptors < VK_MAX_COMPUTE_TASKS;
|
||||||
|
|
||||||
VkDescriptorSetAllocateInfo alloc_info = {};
|
VkDescriptorSetAllocateInfo alloc_info = {};
|
||||||
alloc_info.descriptorPool = m_descriptor_pool;
|
alloc_info.descriptorPool = m_descriptor_pool;
|
||||||
|
|||||||
Reference in New Issue
Block a user