Commit fcc8553d authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d10core: Add feature level support.

parent 71d9791e
......@@ -117,7 +117,7 @@ HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver
}
}
hr = D3D10CoreCreateDevice(factory, adapter, flags, NULL, device);
hr = D3D10CoreCreateDevice(factory, adapter, flags, D3D_FEATURE_LEVEL_10_0, device);
IDXGIAdapter_Release(adapter);
IDXGIFactory_Release(factory);
if (FAILED(hr))
......
......@@ -268,7 +268,7 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *This, const void *data, SIZE_T d
/* D3D10Core */
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, void *unknown0, ID3D10Device **device);
unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
#define MAKE_TAG(ch0, ch1, ch2, ch3) \
((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
......
......@@ -27,7 +27,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, void *unknown0, ID3D10Device **device);
unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
#define WINE_D3D10_TO_STR(x) case x: return #x
......@@ -161,9 +161,7 @@ HRESULT WINAPI D3D10CreateDevice1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE drive
}
}
FIXME("Ignoring feature level %s.\n", debug_d3d10_feature_level(hw_level));
hr = D3D10CoreCreateDevice(factory, adapter, flags, NULL, (ID3D10Device **)device);
hr = D3D10CoreCreateDevice(factory, adapter, flags, hw_level, (ID3D10Device **)device);
IDXGIAdapter_Release(adapter);
IDXGIFactory_Release(factory);
if (FAILED(hr))
......
......@@ -82,7 +82,7 @@ static void test_create_device(void)
}
feature_level = ID3D10Device1_GetFeatureLevel(device);
todo_wine ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
ID3D10Device1_Release(device);
......@@ -165,7 +165,7 @@ static void test_create_device(void)
ok(!refcount, "Swapchain has %u references left.\n", refcount);
feature_level = ID3D10Device1_GetFeatureLevel(device);
todo_wine ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
refcount = ID3D10Device1_Release(device);
......
@ stdcall D3D10CoreCreateDevice(ptr ptr long ptr ptr)
@ stdcall D3D10CoreCreateDevice(ptr ptr long long ptr)
@ stdcall D3D10CoreRegisterLayers()
......@@ -26,8 +26,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, UINT flags,
const D3D_FEATURE_LEVEL *feature_levels, UINT levels, ID3D11Device **device);
HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, unsigned int flags,
const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count, ID3D11Device **device);
HRESULT WINAPI D3D10CoreRegisterLayers(void)
{
......@@ -37,14 +37,13 @@ HRESULT WINAPI D3D10CoreRegisterLayers(void)
}
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, void *unknown0, ID3D10Device **device)
unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device)
{
D3D_FEATURE_LEVEL feature_level = D3D_FEATURE_LEVEL_10_0;
ID3D11Device *device11;
HRESULT hr;
TRACE("factory %p, adapter %p, flags %#x, unknown0 %p, device %p.\n",
factory, adapter, flags, unknown0, device);
TRACE("factory %p, adapter %p, flags %#x, feature_level %#x, device %p.\n",
factory, adapter, flags, feature_level, device);
if (FAILED(hr = D3D11CoreCreateDevice(factory, adapter, flags, &feature_level, 1, &device11)))
return hr;
......
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