[PATCH vkd3d 4/5] tests: Add test for creating instance with vkGetInstanceProcAddr() pointer.

Józef Kucia joseph.kucia at gmail.com
Fri Jan 19 10:17:24 CST 2018


From: Józef Kucia <jkucia at codeweavers.com>

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 tests/.gitignore  | 1 +
 tests/vkd3d_api.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/tests/.gitignore b/tests/.gitignore
index 2ea34ba29578..87d1ea6590ea 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1 +1,2 @@
 d3d12
+vkd3d_api
diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c
index c387abecc196..8923d8e44120 100644
--- a/tests/vkd3d_api.c
+++ b/tests/vkd3d_api.c
@@ -92,6 +92,13 @@ static void test_create_instance(void)
     create_info.signal_event_pfn = NULL;
     hr = vkd3d_create_instance(&create_info, &instance);
     ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+    create_info = instance_default_create_info;
+    create_info.vkGetInstanceProcAddr_pfn = vkGetInstanceProcAddr;
+    hr = vkd3d_create_instance(&create_info, &instance);
+    ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr);
+    refcount = vkd3d_instance_decref(instance);
+    ok(!refcount, "Instance has %u references left.\n", refcount);
 }
 
 static void test_create_device(void)
-- 
2.13.6




More information about the wine-devel mailing list