Module: vkd3d
Branch: master
Commit: 5c097521942cb4fa5e076c6a89ef4c197e20c409
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/5c097521942cb4fa5e076c6a89ef4…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com>
Date: Wed Aug 23 11:07:16 2023 +1000
vkd3d: Do not flush descriptor heaps stored in the command list when the array size is exceeded.
An earlier patch introduced a bug which overflows the descriptor heap
array. The array should not be emptied here in case the list is
resubmitted, so just flush the new heap.
---
libs/vkd3d/command.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 8b5f7899..42a98763 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -3225,7 +3225,10 @@ static void command_list_add_descriptor_heap(struct d3d12_command_list *list, st
{
/* Descriptors can be written after binding. */
FIXME("Flushing descriptor updates while list %p is not closed.\n", list);
- command_list_flush_vk_heap_updates(list);
+ vkd3d_mutex_lock(&heap->vk_sets_mutex);
+ d3d12_desc_flush_vk_heap_updates_locked(heap, list->device);
+ vkd3d_mutex_unlock(&heap->vk_sets_mutex);
+ return;
}
list->descriptor_heaps[list->descriptor_heap_count++] = heap;
}
Module: vkd3d
Branch: master
Commit: ed9e236b0173e89265453b6bc993fdce47ea7122
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/ed9e236b0173e89265453b6bc993f…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Tue Aug 22 03:40:50 2023 -0400
vkd3d-shader/tpf: Avoid reading constant value components beyond type's width (Valgrind).
We are passing map writemasks that may have more components than the
constant's data type, so a (j < width) check is added to avoid reading
components from the constant that are not intended to be used.
Remaining values in the register are initialized to zero.
---
libs/vkd3d-shader/tpf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c
index 550f9b27..cf2cc0d1 100644
--- a/libs/vkd3d-shader/tpf.c
+++ b/libs/vkd3d-shader/tpf.c
@@ -3715,8 +3715,10 @@ static void sm4_src_from_constant_value(struct sm4_src_register *src,
src->reg.dim = VKD3D_SM4_DIMENSION_VEC4;
for (i = 0; i < 4; ++i)
{
- if (map_writemask & (1u << i))
+ if ((map_writemask & (1u << i)) && (j < width))
src->reg.immconst_uint[i] = value->u[j++].u;
+ else
+ src->reg.immconst_uint[i] = 0;
}
}
}