From 08a7d7a16576eaafb437a34fa993dbb5c5a55750 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Fri, 27 Aug 2021 16:46:48 +0200 Subject: [PATCH] vkd3d: Bind local root signature static set. Signed-off-by: Hans-Kristian Arntzen --- libs/vkd3d/command.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index eeb4eafb..6e565888 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -5048,6 +5048,7 @@ static bool d3d12_command_list_update_compute_state(struct d3d12_command_list *l static bool d3d12_command_list_update_raygen_state(struct d3d12_command_list *list) { + const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; d3d12_command_list_end_current_render_pass(list, false); if (!d3d12_command_list_update_raygen_pipeline(list)) @@ -5057,6 +5058,18 @@ static bool d3d12_command_list_update_raygen_state(struct d3d12_command_list *li * raygen bind point in Vulkan. */ d3d12_command_list_update_descriptors(list, VK_PIPELINE_BIND_POINT_COMPUTE); + /* If we have a static sampler set for local root signatures, bind it now. + * Don't bother with dirty tracking of this for time being. + * Should be very rare that this path is even hit. */ + if (list->rt_state->local_static_sampler.desc_set) + { + VK_CALL(vkCmdBindDescriptorSets(list->vk_command_buffer, VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + list->rt_state->local_static_sampler.pipeline_layout, + list->rt_state->local_static_sampler.set_index, + 1, &list->rt_state->local_static_sampler.desc_set, + 0, NULL)); + } + return true; }