diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 3a35596d..71493d65 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -572,10 +572,17 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_ReadFromSubresource(ID3D12Resour static HRESULT STDMETHODCALLTYPE d3d12_resource_GetHeapProperties(ID3D12Resource *iface, D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *flags) { - FIXME("iface %p, heap_properties %p, flags %p stub!\n", + struct d3d12_resource *resource = impl_from_ID3D12Resource(iface); + + TRACE("iface %p, heap_properties %p, flags %p.\n", iface, heap_properties, flags); - return E_NOTIMPL; + if (heap_properties) + *heap_properties = resource->heap_properties; + if (flags) + *flags = resource->heap_flags; + + return S_OK; } static const struct ID3D12ResourceVtbl d3d12_resource_vtbl = @@ -691,6 +698,7 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st resource->map_data = NULL; resource->heap_properties = *heap_properties; + resource->heap_flags = heap_flags; resource->initial_state = initial_state; resource->device = device; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 88e297d7..87ad2785 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -165,6 +165,7 @@ struct d3d12_resource void *map_data; D3D12_HEAP_PROPERTIES heap_properties; + D3D12_HEAP_FLAGS heap_flags; D3D12_RESOURCE_STATES initial_state; struct d3d12_device *device;