Commit 23ad7f6a authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Get rid of set_feature_level() from dxgi_device_layer.

parent 29533a6c
......@@ -95,27 +95,11 @@ static HRESULT WINAPI layer_create(enum dxgi_device_layer_id id, void **layer_ba
return S_OK;
}
static void WINAPI layer_set_feature_level(enum dxgi_device_layer_id id, void *device,
D3D_FEATURE_LEVEL feature_level)
{
struct d3d_device *d3d_device = device;
TRACE("id %#x, device %p, feature_level %#x.\n", id, device, feature_level);
if (id != DXGI_DEVICE_LAYER_D3D10_DEVICE)
{
WARN("Unknown layer id %#x.\n", id);
return;
}
d3d_device->feature_level = feature_level;
}
HRESULT WINAPI D3D11CoreRegisterLayers(void)
{
static const struct dxgi_device_layer layers[] =
{
{DXGI_DEVICE_LAYER_D3D10_DEVICE, layer_init, layer_get_size, layer_create, layer_set_feature_level},
{DXGI_DEVICE_LAYER_D3D10_DEVICE, layer_init, layer_get_size, layer_create},
};
DXGID3D10RegisterLayers(layers, ARRAY_SIZE(layers));
......
......@@ -588,8 +588,6 @@ struct dxgi_device_layer
UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
void *device_object, REFIID riid, void **device_layer);
void (WINAPI *set_feature_level)(enum dxgi_device_layer_id id, void *device,
D3D_FEATURE_LEVEL feature_level);
};
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter,
......
......@@ -6004,6 +6004,8 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par
wined3d_device_incref(wined3d_device);
device->wined3d_device = wined3d_device;
device->feature_level = wined3d_device_get_feature_level(wined3d_device);
set_default_depth_stencil_state(wined3d_device);
}
......
......@@ -411,7 +411,6 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
IWineDXGIDeviceParent *dxgi_device_parent;
struct dxgi_adapter *dxgi_adapter;
struct dxgi_factory *dxgi_factory;
D3D_FEATURE_LEVEL feature_level;
void *layer_base;
HRESULT hr;
......@@ -455,15 +454,6 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
wined3d_device_parent = IWineDXGIDeviceParent_get_wined3d_device_parent(dxgi_device_parent);
IWineDXGIDeviceParent_Release(dxgi_device_parent);
if (!(feature_level = dxgi_check_feature_level_support(dxgi_factory, dxgi_adapter,
feature_levels, level_count)))
{
IUnknown_Release(device->child_layer);
wined3d_private_store_cleanup(&device->private_store);
wined3d_mutex_unlock();
return E_FAIL;
}
if (FAILED(hr = wined3d_device_create(dxgi_factory->wined3d,
dxgi_adapter->ordinal, WINED3D_DEVICE_TYPE_HAL, NULL, 0, 4,
(const enum wined3d_feature_level *)feature_levels, level_count,
......@@ -476,8 +466,6 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
return hr;
}
layer->set_feature_level(layer->id, device->child_layer, feature_level);
memset(&swapchain_desc, 0, sizeof(swapchain_desc));
swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
swapchain_desc.device_window = dxgi_factory_get_device_window(dxgi_factory);
......
......@@ -75,8 +75,6 @@ struct dxgi_device_layer
UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
void *device_object, REFIID riid, void **device_layer);
void (WINAPI *set_feature_level)(enum dxgi_device_layer_id id, void *device,
D3D_FEATURE_LEVEL feature_level);
};
/* TRACE helper functions */
......
......@@ -23,7 +23,6 @@
#include "dxgi_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define WINE_DXGI_TO_STR(x) case x: return #x
......@@ -674,7 +673,5 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory,
debug_feature_level(feature_levels[i]));
}
FIXME_(winediag)("None of the requested D3D feature levels is supported on this GPU "
"with the current shader backend.\n");
return 0;
}
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