summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-09-18 22:46:43 +0200
committerBas Nieuwenhuizen <[email protected]>2018-09-18 22:51:42 +0200
commit95bb7d82ca8abf514af2575e3b9f4babfbb034c4 (patch)
treefad2df0b9459c6dac5058708f405f432d384043f
parentc9dbe52f848ae795ae9fdd7cbeca857db27dcc48 (diff)
Revert "radv: fix descriptor pool allocation size"
This reverts commit 90819abb56f6b1a0cd4946b13b6caf24fb46e500. This logic was wrong, the original code is correct. The direct impact is that we allocate up to approximately a squared amount of memory compared to what we should allocate. Acked-by: Samuel Pitoiset <[email protected]>
-rw-r--r--src/amd/vulkan/radv_descriptor_set.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c
index 49d0811bb06..c4341f6ac52 100644
--- a/src/amd/vulkan/radv_descriptor_set.c
+++ b/src/amd/vulkan/radv_descriptor_set.c
@@ -569,10 +569,9 @@ VkResult radv_CreateDescriptorPool(
}
if (!(pCreateInfo->flags & VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT)) {
- uint64_t host_size = sizeof(struct radv_descriptor_set);
+ uint64_t host_size = pCreateInfo->maxSets * sizeof(struct radv_descriptor_set);
host_size += sizeof(struct radeon_winsys_bo*) * bo_count;
host_size += sizeof(struct radv_descriptor_range) * range_count;
- host_size *= pCreateInfo->maxSets;
size += host_size;
} else {
size += sizeof(struct radv_descriptor_pool_entry) * pCreateInfo->maxSets;