mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
libs/vkd3d: Release current command allocator in d3d12_command_list_Close().
d3d12_command_allocator_free_command_buffer() is not a very accurate name. 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
e061e9f3cb
commit
5d85da0d84
@@ -2928,12 +2928,23 @@ static void test_reset_command_allocator(void)
|
||||
|
||||
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
|
||||
command_allocator2, NULL, &IID_ID3D12GraphicsCommandList, (void **)&command_list2);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
|
||||
hr = ID3D12GraphicsCommandList_Close(command_list2);
|
||||
ok(SUCCEEDED(hr), "Failed to close command list, hr %#x.\n", hr);
|
||||
hr = ID3D12GraphicsCommandList_Reset(command_list2, command_allocator, NULL);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
ID3D12GraphicsCommandList_Release(command_list2);
|
||||
|
||||
/* A command allocator can be re-used after closing the command list. */
|
||||
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
|
||||
command_allocator, NULL, &IID_ID3D12GraphicsCommandList, (void **)&command_list2);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
hr = ID3D12GraphicsCommandList_Close(command_list);
|
||||
ok(SUCCEEDED(hr), "Failed to close command list, hr %#x.\n", hr);
|
||||
hr = ID3D12Device_CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
|
||||
command_allocator, NULL, &IID_ID3D12GraphicsCommandList, (void **)&command_list2);
|
||||
ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
|
||||
|
||||
ID3D12CommandAllocator_Release(command_allocator);
|
||||
ID3D12CommandAllocator_Release(command_allocator2);
|
||||
|
||||
Reference in New Issue
Block a user