Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/d3d11_main.c | 18 +----------------- dlls/d3d11/d3d11_private.h | 2 -- dlls/d3d11/device.c | 2 ++ dlls/dxgi/device.c | 12 ------------ dlls/dxgi/dxgi_private.h | 2 -- dlls/dxgi/utils.c | 3 --- 6 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/dlls/d3d11/d3d11_main.c b/dlls/d3d11/d3d11_main.c index 6d981160f245..9c89820f6f53 100644 --- a/dlls/d3d11/d3d11_main.c +++ b/dlls/d3d11/d3d11_main.c @@ -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)); diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 6ec413139cf6..3049193ce284 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -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, diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e6ba31c7c4b7..1edd41f0d404 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -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); }
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index deb07ca0d821..51773e9c0054 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -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); diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 3a59196e1abd..8c3e41a390bb 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -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 */ diff --git a/dlls/dxgi/utils.c b/dlls/dxgi/utils.c index 009d351f633f..ad8e2a23f2ae 100644 --- a/dlls/dxgi/utils.c +++ b/dlls/dxgi/utils.c @@ -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; }