Module: wine Branch: master Commit: 2f622ac50a9ba65a834c0a31bcb2666db11ccb45 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2f622ac50a9ba65a834c0a31b...
Author: Józef Kucia jkucia@codeweavers.com Date: Mon Mar 11 11:28:59 2019 +0100
d3d12: Set ordinal for D3D12CreateDevice().
It seems that D3D12CreateDevice() is imported by ordinal on Windows.
Reported by Sveinar Søpler.
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
---
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 5c4f4cf..7c2ae98 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 6b6f056..76efb56 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();