d3d11: Implement device_GetFeatureLevel().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ffce30bc31
commit
1e77bb01db
|
@ -82,7 +82,7 @@ static void test_create_device(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
feature_level = ID3D10Device1_GetFeatureLevel(device);
|
feature_level = ID3D10Device1_GetFeatureLevel(device);
|
||||||
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
|
todo_wine ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
|
||||||
feature_level, supported_feature_level);
|
feature_level, supported_feature_level);
|
||||||
|
|
||||||
ID3D10Device1_Release(device);
|
ID3D10Device1_Release(device);
|
||||||
|
@ -165,7 +165,7 @@ static void test_create_device(void)
|
||||||
ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
ok(!refcount, "Swapchain has %u references left.\n", refcount);
|
||||||
|
|
||||||
feature_level = ID3D10Device1_GetFeatureLevel(device);
|
feature_level = ID3D10Device1_GetFeatureLevel(device);
|
||||||
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
|
todo_wine ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
|
||||||
feature_level, supported_feature_level);
|
feature_level, supported_feature_level);
|
||||||
|
|
||||||
refcount = ID3D10Device1_Release(device);
|
refcount = ID3D10Device1_Release(device);
|
||||||
|
|
|
@ -104,6 +104,8 @@ static HRESULT WINAPI layer_create(enum dxgi_device_layer_id id, void **layer_ba
|
||||||
static void WINAPI layer_set_feature_level(enum dxgi_device_layer_id id, void *device,
|
static void WINAPI layer_set_feature_level(enum dxgi_device_layer_id id, void *device,
|
||||||
D3D_FEATURE_LEVEL feature_level)
|
D3D_FEATURE_LEVEL feature_level)
|
||||||
{
|
{
|
||||||
|
struct d3d_device *d3d_device = device;
|
||||||
|
|
||||||
TRACE("id %#x, device %p, feature_level %u.\n", id, device, feature_level);
|
TRACE("id %#x, device %p, feature_level %u.\n", id, device, feature_level);
|
||||||
|
|
||||||
if (id != DXGI_DEVICE_LAYER_D3D10_DEVICE)
|
if (id != DXGI_DEVICE_LAYER_D3D10_DEVICE)
|
||||||
|
@ -111,6 +113,8 @@ static void WINAPI layer_set_feature_level(enum dxgi_device_layer_id id, void *d
|
||||||
WARN("Unknown layer id %#x.\n", id);
|
WARN("Unknown layer id %#x.\n", id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d3d_device->feature_level = feature_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3D11CoreRegisterLayers(void)
|
HRESULT WINAPI D3D11CoreRegisterLayers(void)
|
||||||
|
|
|
@ -394,6 +394,8 @@ struct d3d_device
|
||||||
IUnknown *outer_unk;
|
IUnknown *outer_unk;
|
||||||
LONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
|
D3D_FEATURE_LEVEL feature_level;
|
||||||
|
|
||||||
struct d3d11_immediate_context immediate_context;
|
struct d3d11_immediate_context immediate_context;
|
||||||
|
|
||||||
struct wined3d_device_parent device_parent;
|
struct wined3d_device_parent device_parent;
|
||||||
|
|
|
@ -2536,9 +2536,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Devi
|
||||||
|
|
||||||
static D3D_FEATURE_LEVEL STDMETHODCALLTYPE d3d11_device_GetFeatureLevel(ID3D11Device *iface)
|
static D3D_FEATURE_LEVEL STDMETHODCALLTYPE d3d11_device_GetFeatureLevel(ID3D11Device *iface)
|
||||||
{
|
{
|
||||||
FIXME("iface %p stub!\n", iface);
|
struct d3d_device *device = impl_from_ID3D11Device(iface);
|
||||||
|
|
||||||
return D3D_FEATURE_LEVEL_10_0;
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
|
return device->feature_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT STDMETHODCALLTYPE d3d11_device_GetCreationFlags(ID3D11Device *iface)
|
static UINT STDMETHODCALLTYPE d3d11_device_GetCreationFlags(ID3D11Device *iface)
|
||||||
|
@ -4557,9 +4559,11 @@ static void STDMETHODCALLTYPE d3d10_device_GetTextFilterSize(ID3D10Device1 *ifac
|
||||||
|
|
||||||
static D3D10_FEATURE_LEVEL1 STDMETHODCALLTYPE d3d10_device_GetFeatureLevel(ID3D10Device1 *iface)
|
static D3D10_FEATURE_LEVEL1 STDMETHODCALLTYPE d3d10_device_GetFeatureLevel(ID3D10Device1 *iface)
|
||||||
{
|
{
|
||||||
FIXME("iface %p stub!\n", iface);
|
struct d3d_device *device = impl_from_ID3D10Device(iface);
|
||||||
|
|
||||||
return D3D10_FEATURE_LEVEL_10_1;
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
|
return device->feature_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct ID3D10Device1Vtbl d3d10_device1_vtbl =
|
static const struct ID3D10Device1Vtbl d3d10_device1_vtbl =
|
||||||
|
|
Loading…
Reference in New Issue