mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Implement CreateCommittedResource2().
This commit is contained in:
parent
6edba86a26
commit
e5ae6bd3c2
Notes:
Alexandre Julliard
2024-03-08 23:47:57 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/683
@ -4538,12 +4538,23 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource2(ID3D12Dev
|
||||
D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value,
|
||||
ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
|
||||
{
|
||||
FIXME("iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
|
||||
"optimized_clear_value %p, protected_session %p, iid %s, resource %p stub!\n",
|
||||
struct d3d12_device *device = impl_from_ID3D12Device8(iface);
|
||||
struct d3d12_resource *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
|
||||
"optimized_clear_value %p, protected_session %p, iid %s, resource %p.\n",
|
||||
iface, heap_properties, heap_flags, desc, initial_state,
|
||||
optimized_clear_value, protected_session, debugstr_guid(iid), resource);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (FAILED(hr = d3d12_committed_resource_create(device, heap_properties, heap_flags,
|
||||
desc, initial_state, optimized_clear_value, protected_session, &object)))
|
||||
{
|
||||
*resource = NULL;
|
||||
return hr;
|
||||
}
|
||||
|
||||
return return_interface(&object->ID3D12Resource2_iface, &IID_ID3D12Resource2, iid, resource);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource1(ID3D12Device8 *iface,
|
||||
|
@ -1879,15 +1879,11 @@ static void test_create_committed_resource(void)
|
||||
hr = ID3D12Device8_CreateCommittedResource2(device8, &heap_properties, D3D12_HEAP_FLAG_NONE,
|
||||
&resource_desc1, D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value, NULL,
|
||||
&IID_ID3D12Resource2, (void **)&resource2);
|
||||
todo
|
||||
ok(hr == S_OK, "Failed to create committed resource, hr %#x.\n", hr);
|
||||
|
||||
if (!hr)
|
||||
{
|
||||
check_interface(resource2, &IID_ID3D12Resource2, true);
|
||||
ID3D12Resource2_Release(resource2);
|
||||
}
|
||||
check_interface(resource2, &IID_ID3D12Resource2, true);
|
||||
|
||||
ID3D12Resource2_Release(resource2);
|
||||
ID3D12Device8_Release(device8);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user