Skip to content

Commit

Permalink
Set the dynamic descriptor count
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 8, 2024
1 parent c7a2a7b commit a6e4464
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a6e4464

Please sign in to comment.