23#define D3D11_INIT_GUID
32#define D3D11_TO_STR(x) case x: return #x
51 WARN(
"Unknown layer id %#x\n",
id);
60 TRACE(
"id %#x, args %p, unknown0 %#lx.\n",
id,
args, unknown0);
64 WARN(
"Unknown layer id %#x\n",
id);
72 void *device_object,
REFIID riid,
void **device_layer)
76 TRACE(
"id %#x, layer_base %p, unknown0 %#lx, device_object %p, riid %s, device_layer %p.\n",
81 WARN(
"Unknown layer id %#x\n",
id);
88 *device_layer = &
object->IUnknown_inner;
90 TRACE(
"Created d3d10 device at %p\n",
object);
115 TRACE(
"factory %p, adapter %p, flags %#x, feature_levels %p, levels %u, device %p.\n",
122 WARN(
"Failed to create device, returning %#lx.\n",
hr);
130 ERR(
"Failed to query ID3D11Device interface, returning E_FAIL.\n");
136 ERR(
"Failed to retrieve device impl, returning E_FAIL.\n");
161 TRACE(
"adapter %p, driver_type %s, swrast %p, flags %#x, feature_levels %p, levels %u, sdk_version %u, "
162 "device %p, obtained_feature_level %p, immediate_context %p.\n",
179 WARN(
"Failed to get dxgi factory, returning %#lx.\n",
hr);
188 WARN(
"Failed to create dxgi factory, returning %#lx.\n",
hr);
195 FIXME(
"WARP driver not implemented, falling back to hardware.\n");
201 WARN(
"No adapters found, returning %#lx.\n",
hr);
209 FIXME(
"NULL device not implemented, falling back to refrast.\n");
216 WARN(
"Failed to load refrast, returning E_FAIL.\n");
224 WARN(
"Failed to create a software adapter, returning %#lx.\n",
hr);
235 WARN(
"Software device requested, but NULL swrast passed, returning E_FAIL.\n");
242 WARN(
"Failed to create a software adapter, returning %#lx.\n",
hr);
266 WARN(
"Failed to create a device, returning %#lx.\n",
hr);
281 ID3D11Device_Release(
device);
305 TRACE(
"adapter %p, driver_type %s, swrast %p, flags %#x, feature_levels %p, levels %u, sdk_version %u, "
306 "swapchain_desc %p, swapchain %p, device %p, obtained_feature_level %p, immediate_context %p.\n",
320 WARN(
"Failed to create a device, returning %#lx.\n",
hr);
328 ERR(
"Failed to get a dxgi device from the d3d11 device, returning %#lx.\n",
hr);
336 ERR(
"Failed to get the device adapter, returning %#lx.\n",
hr);
344 ERR(
"Failed to get the adapter factory, returning %#lx.\n",
hr);
348 desc = *swapchain_desc;
353 WARN(
"Failed to create a swapchain, returning %#lx.\n",
hr);
357 TRACE(
"Created IDXGISwapChain %p.\n", *swapchain);
363 ID3D11Device_Release(
device);
368 ID3D11Device_Release(
device);
383 ID3D11Device **d3d11_device, ID3D11DeviceContext **d3d11_immediate_context,
386 FIXME(
"device %p, flags %#x, feature_levels %p, feature_level_count %u, "
387 "queues %p, queue_count %u, node_mask 0x%08x, "
388 "d3d11_device %p, d3d11_immediate_context %p, obtained_feature_level %p stub!\n",
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d11, IDXGIFactory *factory, IDXGIAdapter *adapter, unsigned int flags, const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count, void **device)
HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, ID3D11Device **device)
static HRESULT d3d11_create_device(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context)
static const char * debug_d3d_driver_type(D3D_DRIVER_TYPE driver_type)
static UINT WINAPI layer_get_size(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0)
HRESULT WINAPI D3D11On12CreateDevice(IUnknown *device, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT feature_level_count, IUnknown *const *queues, UINT queue_count, UINT node_mask, ID3D11Device **d3d11_device, ID3D11DeviceContext **d3d11_immediate_context, D3D_FEATURE_LEVEL *obtained_feature_level)
HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, const DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain **swapchain, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context)
static HRESULT WINAPI layer_create(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0, void *device_object, REFIID riid, void **device_layer)
HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context)
HRESULT WINAPI D3D11CoreRegisterLayers(void)
static HRESULT WINAPI layer_init(enum dxgi_device_layer_id id, DWORD *count, DWORD *values)
HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count)
@ DXGI_DEVICE_LAYER_D3D10_DEVICE
void d3d_device_init(struct d3d_device *device, void *outer_unknown)
static struct d3d_device * impl_from_ID3D11Device(ID3D11Device *iface)
@ D3D_DRIVER_TYPE_HARDWARE
@ D3D_DRIVER_TYPE_SOFTWARE
@ D3D_DRIVER_TYPE_REFERENCE
@ D3D_DRIVER_TYPE_UNKNOWN
const char * wine_dbg_sprintf(const char *format,...)
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
HRESULT WINAPI CreateDXGIFactory1(REFIID iid, void **factory)
GLuint GLuint GLsizei count
GLboolean GLenum GLenum GLvoid * values
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT sdk_version
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT ID3D11Device ** device_out
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT ID3D11Device D3D_FEATURE_LEVEL * obtained_feature_level
static D3D_DRIVER_TYPE driver_type
static D3D_DRIVER_TYPE HMODULE swrast
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL * feature_levels
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT ID3D11Device D3D_FEATURE_LEVEL ID3D11DeviceContext ** immediate_context
D3D11_SHADER_VARIABLE_DESC desc