/// <inheritdoc/> public RentedCommandAllocator Copy() { var copy = this; copy._value = _value.Copy(); return(copy); }
private GpuResource AllocateCommitted(GpuResourceDesc desc, D3D12_RESOURCE_ALLOCATION_INFO allocInfo) { using var device = _device.Copy(); var heapProperties = GetHeapProperties(desc); var clearVal = desc.ClearValue.GetValueOrDefault(); using ComPtr <ID3D12Resource> resource = default; Guard.ThrowIfFailed(device.Get()->CreateCommittedResource( &heapProperties, desc.HeapFlags, &desc.ResourceFormat.D3D12ResourceDesc, desc.InitialState, desc.ClearValue is null ? null : &clearVal, resource.Guid, ComPtr.GetVoidAddressOf(&resource) )); return(new GpuResource( resource.Move(), desc, allocInfo.SizeInBytes, 0,
public AllocatorAndMarker Copy() { var copy = this; copy.Allocator = Allocator.Copy(); return(copy); }
/// <summary> /// /// </summary> /// <returns></returns> public GraphicsContext Copy() { var copy = this; copy._list = _list.Copy(); copy._allocator = _allocator.Copy(); return(copy); }
public GpuCommandSet Copy() { var copy = this; copy.List = List.Copy(); copy.Allocator = Allocator.Copy(); return(copy); }
internal GpuDispatchSynchronizer GetSynchronizer(FenceMarker fenceMarker) { return(new GpuDispatchSynchronizer(_fence.Copy(), fenceMarker)); }