Module: vkd3d Branch: master Commit: d6ff603605d33dfbb28a62348670f0d0c9d06f74 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=d6ff603605d33dfbb28a6234...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Wed Nov 24 00:41:34 2021 +1000
vkd3d: Only allocate descriptor offsets when descriptor arrays are used.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
libs/vkd3d/state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 413b0a3..cb3f99a 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1170,8 +1170,8 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa if (!(root_signature->descriptor_mapping = vkd3d_calloc(root_signature->binding_count, sizeof(*root_signature->descriptor_mapping)))) goto fail; - if (!(root_signature->descriptor_offsets = vkd3d_calloc(root_signature->binding_count, - sizeof(*root_signature->descriptor_offsets)))) + if (root_signature->use_descriptor_arrays && !(root_signature->descriptor_offsets = vkd3d_calloc( + root_signature->binding_count, sizeof(*root_signature->descriptor_offsets)))) goto fail; root_signature->root_constant_count = info.root_constant_count; if (!(root_signature->root_constants = vkd3d_calloc(root_signature->root_constant_count,