mtx_lock(&set->pool->defragment_lock);
dzn_descriptor_heap_copy(device, dst_heap, dst_heap_offset + set_heap_offset,
&set->pool->heaps[type], set->heap_offsets[type],
- set_desc_count);
+ set_desc_count, type);
mtx_unlock(&set->pool->defragment_lock);
}
bool shader_visible)
{
heap->desc_count = desc_count;
- heap->type = type;
heap->desc_sz = ID3D12Device1_GetDescriptorHandleIncrementSize(device->dev, type);
D3D12_DESCRIPTOR_HEAP_DESC desc = {
uint32_t dst_offset,
const struct dzn_descriptor_heap *src_heap,
uint32_t src_offset,
- uint32_t desc_count)
+ uint32_t desc_count,
+ D3D12_DESCRIPTOR_HEAP_TYPE type)
{
D3D12_CPU_DESCRIPTOR_HANDLE dst_handle =
dzn_descriptor_heap_get_cpu_handle(dst_heap, dst_offset);
ID3D12Device1_CopyDescriptorsSimple(device->dev, desc_count,
dst_handle,
src_handle,
- dst_heap->type);
+ type);
}
struct dzn_descriptor_set_ptr {
&new_heap, heap_offset,
&pool->heaps[type],
pool->sets[s].heap_offsets[type],
- pool->sets[s].heap_sizes[type]);
+ pool->sets[s].heap_sizes[type],
+ type);
pool->sets[s].heap_offsets[type] = heap_offset;
heap_offset += pool->sets[s].heap_sizes[type];
}
dst_set->heap_offsets[type] + dst_heap_offset,
&src_set->pool->heaps[type],
src_set->heap_offsets[type] + src_heap_offset,
- count);
+ count, type);
if (dzn_descriptor_type_depends_on_shader_usage(src_type)) {
src_heap_offset =
dst_set->heap_offsets[type] + dst_heap_offset,
&src_set->pool->heaps[type],
src_set->heap_offsets[type] + src_heap_offset,
- count);
+ count, type);
}
mtx_unlock(&dst_set->pool->defragment_lock);
mtx_unlock(&src_set->pool->defragment_lock);
struct dzn_descriptor_heap {
ID3D12DescriptorHeap *heap;
- D3D12_DESCRIPTOR_HEAP_TYPE type;
SIZE_T cpu_base;
uint64_t gpu_base;
uint32_t desc_count;
dzn_descriptor_heap_copy(struct dzn_device *device,
struct dzn_descriptor_heap *dst_heap, uint32_t dst_heap_offset,
const struct dzn_descriptor_heap *src_heap, uint32_t src_heap_offset,
- uint32_t desc_count);
+ uint32_t desc_count, D3D12_DESCRIPTOR_HEAP_TYPE type);
struct dzn_descriptor_heap_pool_entry {
struct list_head link;