libs/vkd3d: Implement D3D12_ROOT_PARAMETER_TYPE_CBV root signature parameters.

This commit is contained in:
Henri Verbeet
2016-11-02 11:31:59 +01:00
parent d97df34093
commit 0f38858996
3 changed files with 92 additions and 20 deletions

View File

@@ -1359,24 +1359,27 @@ 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);
ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr);
todo(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", 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);
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);
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;