Saves a couple of conversion calls later, and more when Vulkan-backed heaps are added.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d/command.c | 6 +++--- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 37159a7f..9fbde800 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2605,7 +2605,7 @@ static void d3d12_command_list_prepare_descriptors(struct d3d12_command_list *li
if (unbounded_offset != UINT_MAX /* Descriptors may not be set, eg. WoW. */ - && (base_descriptor = d3d12_desc_from_gpu_handle(bindings->descriptor_tables[table_index]))) + && (base_descriptor = bindings->descriptor_tables[table_index])) { heap_size = vkd3d_gpu_descriptor_allocator_range_size_from_descriptor( &device->gpu_descriptor_allocator, base_descriptor); @@ -2981,7 +2981,7 @@ static void d3d12_command_list_update_descriptors(struct d3d12_command_list *lis { if (bindings->descriptor_table_dirty_mask & ((uint64_t)1 << i)) { - if ((base_descriptor = d3d12_desc_from_gpu_handle(bindings->descriptor_tables[i]))) + if ((base_descriptor = bindings->descriptor_tables[i])) d3d12_command_list_update_descriptor_table(list, bind_point, i, base_descriptor); else WARN("Descriptor table %u is not set.\n", i); @@ -4182,7 +4182,7 @@ static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *l assert(root_signature_get_descriptor_table(root_signature, index));
assert(index < ARRAY_SIZE(bindings->descriptor_tables)); - bindings->descriptor_tables[index] = base_descriptor; + bindings->descriptor_tables[index] = d3d12_desc_from_gpu_handle(base_descriptor); bindings->descriptor_table_dirty_mask |= (uint64_t)1 << index; bindings->descriptor_table_active_mask |= (uint64_t)1 << index; } diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 8af374a1..f5cac0cc 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -961,7 +961,7 @@ struct vkd3d_pipeline_bindings VkDescriptorSet descriptor_sets[VKD3D_MAX_DESCRIPTOR_SETS]; bool in_use;
- D3D12_GPU_DESCRIPTOR_HANDLE descriptor_tables[D3D12_MAX_ROOT_COST]; + struct d3d12_desc *descriptor_tables[D3D12_MAX_ROOT_COST]; uint64_t descriptor_table_dirty_mask; uint64_t descriptor_table_active_mask;