From 2f622ac50a9ba65a834c0a31bcb2666db11ccb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 11 Mar 2019 11:28:59 +0100 Subject: [PATCH] d3d12: Set ordinal for D3D12CreateDevice(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that D3D12CreateDevice() is imported by ordinal on Windows. Reported by Sveinar Søpler. Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d12/d3d12.spec | 10 +++++----- dlls/d3d12/tests/d3d12.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/d3d12/d3d12.spec b/dlls/d3d12/d3d12.spec index 5c4f4cfecf8..7c2ae988067 100644 --- a/dlls/d3d12/d3d12.spec +++ b/dlls/d3d12/d3d12.spec @@ -1,11 +1,11 @@ -@ stub GetBehaviorValue -@ stdcall D3D12CreateDevice(ptr long ptr ptr) -@ stdcall D3D12GetDebugInterface(ptr ptr) +100 stub GetBehaviorValue +101 stdcall D3D12CreateDevice(ptr long ptr ptr) +102 stdcall D3D12GetDebugInterface(ptr ptr) @ stub D3D12CoreCreateLayeredDevice @ stub D3D12CoreGetLayeredDeviceSize @ stub D3D12CoreRegisterLayers @ stdcall D3D12CreateRootSignatureDeserializer(ptr long ptr ptr) -@ stdcall D3D12SerializeRootSignature(ptr long ptr ptr) -@ stdcall D3D12EnableExperimentalFeatures(long ptr ptr ptr) #@ stub D3D12CreateVersionedRootSignatureDeserializer +@ stdcall D3D12EnableExperimentalFeatures(long ptr ptr ptr) +@ stdcall D3D12SerializeRootSignature(ptr long ptr ptr) @ stdcall D3D12SerializeVersionedRootSignature(ptr ptr ptr) diff --git a/dlls/d3d12/tests/d3d12.c b/dlls/d3d12/tests/d3d12.c index 6b6f056e877..76efb561c4f 100644 --- a/dlls/d3d12/tests/d3d12.c +++ b/dlls/d3d12/tests/d3d12.c @@ -774,6 +774,21 @@ static void check_sub_resource_uint_(unsigned int line, ID3D12Resource *texture, release_resource_readback(&rb); } +static void test_ordinals(void) +{ + PFN_D3D12_CREATE_DEVICE pfn_D3D12CreateDevice, pfn_101; + HMODULE d3d12; + + d3d12 = GetModuleHandleA("d3d12.dll"); + ok(!!d3d12, "Failed to get module handle.\n"); + + pfn_D3D12CreateDevice = (void *)GetProcAddress(d3d12, "D3D12CreateDevice"); + ok(!!pfn_D3D12CreateDevice, "Failed to get D3D12CreateDevice() proc address.\n"); + + pfn_101 = (void *)GetProcAddress(d3d12, (const char *)101); + ok(pfn_101 == pfn_D3D12CreateDevice, "Got %p, expected %p.\n", pfn_101, pfn_D3D12CreateDevice); +} + static void test_interfaces(void) { D3D12_COMMAND_QUEUE_DESC desc; @@ -1368,6 +1383,7 @@ START_TEST(d3d12) print_adapter_info(); + test_ordinals(); test_interfaces(); test_create_device(); test_draw();