libs/vkd3d: Partially handle descriptor table root parameters.

This commit is contained in:
Józef Kucia
2017-07-17 16:25:29 +02:00
parent 4854b74151
commit 091ac41f79
2 changed files with 110 additions and 25 deletions

View File

@@ -1633,27 +1633,24 @@ static void test_create_root_signature(void)
root_signature_desc.pStaticSamplers = NULL;
root_signature_desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_NONE;
hr = create_root_signature(device, &root_signature_desc, &root_signature);
todo(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr);
ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
refcount = get_refcount(device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
hr = ID3D12RootSignature_GetDevice(root_signature, &IID_ID3D12Device, (void **)&tmp_device);
ok(SUCCEEDED(hr), "GetDevice failed, hr %#x.\n", hr);
refcount = get_refcount(device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
refcount = get_refcount(device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
hr = ID3D12RootSignature_GetDevice(root_signature, &IID_ID3D12Device, (void **)&tmp_device);
ok(SUCCEEDED(hr), "GetDevice failed, hr %#x.\n", hr);
refcount = get_refcount(device);
ok(refcount == 3, "Got unexpected refcount %u.\n", (unsigned int)refcount);
refcount = ID3D12Device_Release(tmp_device);
ok(refcount == 2, "Got unexpected refcount %u.\n", (unsigned int)refcount);
check_interface(root_signature, &IID_ID3D12Object, TRUE);
check_interface(root_signature, &IID_ID3D12DeviceChild, TRUE);
check_interface(root_signature, &IID_ID3D12Pageable, FALSE);
check_interface(root_signature, &IID_ID3D12RootSignature, TRUE);
check_interface(root_signature, &IID_ID3D12Object, TRUE);
check_interface(root_signature, &IID_ID3D12DeviceChild, TRUE);
check_interface(root_signature, &IID_ID3D12Pageable, FALSE);
check_interface(root_signature, &IID_ID3D12RootSignature, TRUE);
refcount = ID3D12RootSignature_Release(root_signature);
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
}
refcount = ID3D12RootSignature_Release(root_signature);
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
root_signature_desc.NumParameters = 0;
root_signature_desc.pParameters = NULL;