Skip to content

Commit ab06cf7

Browse files
committed
A little cleanup
1 parent 908da9d commit ab06cf7

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/nbl/video/CVulkanLogicalDevice.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,15 +1237,7 @@ class CVulkanLogicalDevice final : public ILogicalDevice
12371237

12381238
core::smart_refctd_ptr<IGPUDescriptorSetLayout> createGPUDescriptorSetLayout_impl(const IGPUDescriptorSetLayout::SBinding* _begin, const IGPUDescriptorSetLayout::SBinding* _end) override
12391239
{
1240-
constexpr uint32_t MAX_BINDING_COUNT = 25u;
1241-
constexpr uint32_t MAX_SAMPLER_COUNT_PER_BINDING = 25u;
1242-
12431240
uint32_t bindingCount = std::distance(_begin, _end);
1244-
assert(bindingCount <= MAX_BINDING_COUNT);
1245-
1246-
std::vector<VkSampler> vk_samplers;
1247-
std::vector<VkDescriptorSetLayoutBinding> vk_dsLayoutBindings;
1248-
12491241
uint32_t maxSamplersCount = 0u;
12501242
for (uint32_t b = 0u; b < bindingCount; ++b)
12511243
{
@@ -1254,6 +1246,8 @@ class CVulkanLogicalDevice final : public ILogicalDevice
12541246
maxSamplersCount += binding->count;
12551247
}
12561248

1249+
std::vector<VkSampler> vk_samplers;
1250+
std::vector<VkDescriptorSetLayoutBinding> vk_dsLayoutBindings;
12571251
vk_samplers.reserve(maxSamplersCount); // Reserve to avoid resizing and pointer change while iterating
12581252
vk_dsLayoutBindings.reserve(bindingCount);
12591253

@@ -1272,8 +1266,6 @@ class CVulkanLogicalDevice final : public ILogicalDevice
12721266
{
12731267
// If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL:
12741268
// pImmutableSamplers must be a valid pointer to an array of descriptorCount valid VkSampler handles.
1275-
1276-
assert(binding->count <= MAX_SAMPLER_COUNT_PER_BINDING);
12771269
const uint32_t samplerOffset = vk_samplers.size();
12781270

12791271
for (uint32_t i = 0u; i < binding->count; ++i)

0 commit comments

Comments
 (0)