@@ -2833,8 +2832,7 @@ static void d3d12_command_list_prepare_descriptors(struct d3d12_command_list *li /* Descriptors may not be set, eg. WoW. */ && (base_descriptor = bindings->descriptor_tables[table_index])) { - heap_size = vkd3d_gpu_descriptor_allocator_range_size_from_descriptor( - &device->gpu_descriptor_allocator, base_descriptor); + heap_size = base_descriptor->heap->desc.NumDescriptors; if (heap_size < unbounded_offset) WARN("Descriptor heap size %u is less than the offset %u of an unbounded range in table %u, "
That doesn't do the same thing. Is that intentional, or should this use d3d12_desc_heap_range_size() like elsewhere?
-struct vkd3d_gpu_descriptor_allocator -{ - struct vkd3d_mutex mutex; - - struct vkd3d_gpu_descriptor_allocation *allocations; - size_t allocations_size; - size_t allocation_count; -};
We should also be able to remove struct vkd3d_gpu_descriptor_allocation now, right?
+static inline void d3d12_desc_copy_raw(struct d3d12_desc *dst, const struct d3d12_desc *src) +{ + memcpy(dst, src, offsetof(struct d3d12_desc, heap)); +}
That's a bit unfortunate; this ends up depending on the exact layout of struct d3d12_desc. Could we just wrap the descriptor "body" in a structure instead?