summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-04-23 21:40:31 -0500
committerJason Ekstrand <[email protected]>2019-04-24 05:40:27 +0000
commit45957c05b06f6e05820a87276b682af110bb13a9 (patch)
tree15b35f1d61443d9e9b87a5a55a44c1f7def1b966 /src
parent3d33c13eca2ef2e643020d3d1b27b96ae2e770e5 (diff)
anv/descriptor_set: Properly align descriptor buffer to a page
Instead of aligning and then taking inline uniforms into account, we need to take inline uniforms into account and then align to a page. Otherwise, we may not be aligned to a page and allocation may fail. Fixes: 43f40dc7cb2 "anv: Implement VK_EXT_inline_uniform_block" Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 2d4d37febb5..63fd8c69608 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -676,10 +676,10 @@ VkResult anv_CreateDescriptorPool(
* of them to 32B.
*/
descriptor_bo_size += 32 * pCreateInfo->maxSets;
- descriptor_bo_size = ALIGN(descriptor_bo_size, 4096);
/* We align inline uniform blocks to 32B */
if (inline_info)
descriptor_bo_size += 32 * inline_info->maxInlineUniformBlockBindings;
+ descriptor_bo_size = ALIGN(descriptor_bo_size, 4096);
const size_t pool_size =
pCreateInfo->maxSets * sizeof(struct anv_descriptor_set) +