From a6e44649013097addc21e5e71b5f3ebc67b444b4 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Tue, 8 Oct 2024 18:56:14 +0200 Subject: [PATCH] Set the dynamic descriptor count --- .../Graphics5/Direct3D12/Sources/kope/direct3d12/device.cpp | 5 ++++- .../Direct3D12/Sources/kope/direct3d12/device_functions.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device.cpp b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device.cpp index 0059c3ab0..7370a7813 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device.cpp +++ b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device.cpp @@ -612,12 +612,15 @@ void kope_d3d12_device_wait_until_idle(kope_g5_device *device) { wait_for_fence(device, device->d3d12.execution_fence, device->d3d12.execution_event, device->d3d12.execution_index - 1); } -void kope_d3d12_device_create_descriptor_set(kope_g5_device *device, uint32_t descriptor_count, uint32_t sampler_count, kope_d3d12_descriptor_set *set) { +void kope_d3d12_device_create_descriptor_set(kope_g5_device *device, uint32_t descriptor_count, uint32_t dynamic_descriptor_count, uint32_t sampler_count, + kope_d3d12_descriptor_set *set) { if (descriptor_count > 0) { oa_allocate(&device->d3d12.descriptor_heap_allocator, descriptor_count, &set->descriptor_allocation); } set->descriptor_count = descriptor_count; + set->dynamic_descriptor_count = dynamic_descriptor_count; + if (sampler_count > 0) { oa_allocate(&device->d3d12.sampler_heap_allocator, sampler_count, &set->sampler_allocation); } diff --git a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device_functions.h b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device_functions.h index 413ad1ca5..9843b836b 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device_functions.h +++ b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/device_functions.h @@ -23,7 +23,8 @@ void kope_d3d12_device_create_command_list(kope_g5_device *device, kope_g5_comma void kope_d3d12_device_create_texture(kope_g5_device *device, const kope_g5_texture_parameters *parameters, kope_g5_texture *texture); -void kope_d3d12_device_create_descriptor_set(kope_g5_device *device, uint32_t descriptor_count, uint32_t sampler_count, kope_d3d12_descriptor_set *set); +void kope_d3d12_device_create_descriptor_set(kope_g5_device *device, uint32_t descriptor_count, uint32_t dynamic_descriptor_count, uint32_t sampler_count, + kope_d3d12_descriptor_set *set); void kope_d3d12_device_create_sampler(kope_g5_device *device, const kope_g5_sampler_parameters *parameters, kope_g5_sampler *sampler);