Commit efbd38ae authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

dxgi: The "unknown0" parameter to DXGID3D10CreateDevice() is a pointer.

Fixes stack corruption in the 64-bit tests. Thanks to Paul Vriens for debugging this.
parent 54f3dec8
...@@ -124,7 +124,7 @@ HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver ...@@ -124,7 +124,7 @@ HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver
} }
} }
hr = D3D10CoreCreateDevice(factory, adapter, flags, 0, device); hr = D3D10CoreCreateDevice(factory, adapter, flags, NULL, device);
IDXGIAdapter_Release(adapter); IDXGIAdapter_Release(adapter);
IDXGIFactory_Release(factory); IDXGIFactory_Release(factory);
if (FAILED(hr)) if (FAILED(hr))
......
...@@ -179,6 +179,6 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T d ...@@ -179,6 +179,6 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T d
/* D3D10Core */ /* D3D10Core */
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, ID3D10Device **device); UINT flags, void *unknown0, ID3D10Device **device);
#endif /* __WINE_D3D10_PRIVATE_H */ #endif /* __WINE_D3D10_PRIVATE_H */
@ stdcall D3D10CoreCreateDevice(ptr ptr long long ptr) @ stdcall D3D10CoreCreateDevice(ptr ptr long ptr ptr)
@ stdcall D3D10CoreRegisterLayers() @ stdcall D3D10CoreRegisterLayers()
...@@ -102,13 +102,13 @@ HRESULT WINAPI D3D10CoreRegisterLayers(void) ...@@ -102,13 +102,13 @@ HRESULT WINAPI D3D10CoreRegisterLayers(void)
} }
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, ID3D10Device **device) UINT flags, void *unknown0, ID3D10Device **device)
{ {
IUnknown *dxgi_device; IUnknown *dxgi_device;
HMODULE d3d10core; HMODULE d3d10core;
HRESULT hr; HRESULT hr;
TRACE("factory %p, adapter %p, flags %#x, unknown0 %#x, device %p\n", TRACE("factory %p, adapter %p, flags %#x, unknown0 %p, device %p.\n",
factory, adapter, flags, unknown0, device); factory, adapter, flags, unknown0, device);
d3d10core = GetModuleHandleA("d3d10core.dll"); d3d10core = GetModuleHandleA("d3d10core.dll");
......
...@@ -257,7 +257,7 @@ struct dxgi_device_layer ...@@ -257,7 +257,7 @@ struct dxgi_device_layer
}; };
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter, HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, void **device); UINT flags, void *unknown0, void **device);
HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count); HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count);
#endif /* __WINE_D3D10CORE_PRIVATE_H */ #endif /* __WINE_D3D10CORE_PRIVATE_H */
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "wine/test.h" #include "wine/test.h"
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, ID3D10Device **device); UINT flags, void *unknown0, ID3D10Device **device);
static ID3D10Device *create_device(void) static ID3D10Device *create_device(void)
{ {
...@@ -38,7 +38,7 @@ static ID3D10Device *create_device(void) ...@@ -38,7 +38,7 @@ static ID3D10Device *create_device(void)
ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device);
if (FAILED(hr)) if (FAILED(hr))
{ {
HMODULE d3d10ref; HMODULE d3d10ref;
...@@ -59,7 +59,7 @@ static ID3D10Device *create_device(void) ...@@ -59,7 +59,7 @@ static ID3D10Device *create_device(void)
ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
hr = D3D10CoreCreateDevice(factory, adapter, 0, 0, &device); hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device);
ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
} }
......
@ stdcall CreateDXGIFactory(ptr ptr) @ stdcall CreateDXGIFactory(ptr ptr)
@ stdcall DXGID3D10CreateDevice(ptr ptr ptr long long ptr) @ stdcall DXGID3D10CreateDevice(ptr ptr ptr long ptr ptr)
@ stdcall DXGID3D10RegisterLayers(ptr long) @ stdcall DXGID3D10RegisterLayers(ptr long)
...@@ -224,7 +224,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core) ...@@ -224,7 +224,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core)
} }
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter, HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, void **device) UINT flags, void *unknown0, void **device)
{ {
struct layer_get_size_args get_size_args; struct layer_get_size_args get_size_args;
struct dxgi_device *dxgi_device; struct dxgi_device *dxgi_device;
...@@ -233,7 +233,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I ...@@ -233,7 +233,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
DWORD count; DWORD count;
HRESULT hr; HRESULT hr;
TRACE("d3d10core %p, factory %p, adapter %p, flags %#x, unknown0 %#x, device %p\n", TRACE("d3d10core %p, factory %p, adapter %p, flags %#x, unknown0 %p, device %p.\n",
d3d10core, factory, adapter, flags, unknown0, device); d3d10core, factory, adapter, flags, unknown0, device);
hr = register_d3d10core_layers(d3d10core); hr = register_d3d10core_layers(d3d10core);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "wine/test.h" #include "wine/test.h"
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory,
IDXGIAdapter *adapter, UINT flags, DWORD arg5, void **device); IDXGIAdapter *adapter, UINT flags, void *unknown0, void **device);
static IDXGIDevice *create_device(HMODULE d3d10core) static IDXGIDevice *create_device(HMODULE d3d10core)
{ {
...@@ -39,7 +39,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core) ...@@ -39,7 +39,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core)
ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device);
if (FAILED(hr)) if (FAILED(hr))
{ {
HMODULE d3d10ref; HMODULE d3d10ref;
...@@ -60,7 +60,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core) ...@@ -60,7 +60,7 @@ static IDXGIDevice *create_device(HMODULE d3d10core)
ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr); ok(SUCCEEDED(hr), "CreateSoftwareAdapter failed, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, 0, (void **)&device); hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device);
ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr); ok(SUCCEEDED(hr), "Failed to create a REF device, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup; if (FAILED(hr)) goto cleanup;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment