mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d: Add support for fake placed resources.
Placed resources are not allocated from a given heap yet. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
5319cc2420
commit
e93fed2c93
@@ -146,6 +146,14 @@ static const struct ID3D12HeapVtbl d3d12_heap_vtbl =
|
||||
d3d12_heap_GetDesc,
|
||||
};
|
||||
|
||||
struct d3d12_heap *unsafe_impl_from_ID3D12Heap(ID3D12Heap *iface)
|
||||
{
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == &d3d12_heap_vtbl);
|
||||
return impl_from_ID3D12Heap(iface);
|
||||
}
|
||||
|
||||
static HRESULT validate_heap_desc(const D3D12_HEAP_DESC *desc)
|
||||
{
|
||||
if (!desc->SizeInBytes)
|
||||
@@ -1049,6 +1057,18 @@ HRESULT d3d12_committed_resource_create(struct d3d12_device *device,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, UINT64 heap_offset,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource)
|
||||
{
|
||||
const D3D12_HEAP_DESC *heap_desc = &heap->desc;
|
||||
|
||||
FIXME("Ignoring heap %p, offset %"PRIu64".\n", heap, heap_offset);
|
||||
|
||||
return d3d12_committed_resource_create(device, &heap_desc->Properties, heap_desc->Flags,
|
||||
desc, initial_state, optimized_clear_value, resource);
|
||||
}
|
||||
|
||||
HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
||||
const struct vkd3d_image_resource_create_info *create_info, ID3D12Resource **resource)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user