vkd3d: Implement CreatePlacedResource1().

This commit is contained in:
Conor McCarthy 2024-02-03 00:09:45 +10:00 committed by Alexandre Julliard
parent e5ae6bd3c2
commit 197f16efa9
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
2 changed files with 16 additions and 9 deletions

View File

@ -4562,12 +4562,23 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource1(ID3D12Device
D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value, D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE *optimized_clear_value,
REFIID iid, void **resource) REFIID iid, void **resource)
{ {
FIXME("iface %p, heap %p, heap_offset %#"PRIx64", desc %p, initial_state %#x, " struct d3d12_device *device = impl_from_ID3D12Device8(iface);
"optimized_clear_value %p, iid %s, resource %p stub!\n", struct d3d12_heap *heap_object;
struct d3d12_resource *object;
HRESULT hr;
TRACE("iface %p, heap %p, heap_offset %#"PRIx64", desc %p, initial_state %#x, "
"optimized_clear_value %p, iid %s, resource %p.\n",
iface, heap, heap_offset, resource_desc, initial_state, iface, heap, heap_offset, resource_desc, initial_state,
optimized_clear_value, debugstr_guid(iid), resource); optimized_clear_value, debugstr_guid(iid), resource);
return E_NOTIMPL; heap_object = unsafe_impl_from_ID3D12Heap(heap);
if (FAILED(hr = d3d12_placed_resource_create(device, heap_object, heap_offset,
resource_desc, initial_state, optimized_clear_value, &object)))
return hr;
return return_interface(&object->ID3D12Resource2_iface, &IID_ID3D12Resource2, iid, resource);
} }
static void STDMETHODCALLTYPE d3d12_device_CreateSamplerFeedbackUnorderedAccessView(ID3D12Device8 *iface, static void STDMETHODCALLTYPE d3d12_device_CreateSamplerFeedbackUnorderedAccessView(ID3D12Device8 *iface,

View File

@ -2255,15 +2255,11 @@ static void test_create_placed_resource(void)
hr = ID3D12Device8_CreatePlacedResource1(device8, heap, 0, hr = ID3D12Device8_CreatePlacedResource1(device8, heap, 0,
&resource_desc1, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource2, (void **)&resource2); &resource_desc1, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource2, (void **)&resource2);
todo
ok(hr == S_OK, "Failed to create placed resource, hr %#x.\n", hr); ok(hr == S_OK, "Failed to create placed resource, hr %#x.\n", hr);
if (!hr) check_interface(resource2, &IID_ID3D12Resource2, true);
{
check_interface(resource2, &IID_ID3D12Resource2, true);
ID3D12Resource2_Release(resource2);
}
ID3D12Resource2_Release(resource2);
ID3D12Device8_Release(device8); ID3D12Device8_Release(device8);
} }