47 IUnknown_AddRef(iface);
135 TRACE(
"iface %p, adapter_idx %u, adapter %p.\n", iface, adapter_idx,
adapter);
166 TRACE(
"iface %p, adapter_idx %u, adapter %p.\n", iface, adapter_idx,
adapter);
178 if (
flags > DXGI_MWA_VALID)
213 TRACE(
"iface %p, device %p, desc %p, swapchain %p.\n", iface,
device,
desc, swapchain);
217 WARN(
"Invalid pointer.\n");
221 swapchain_desc.
Width =
desc->BufferDesc.Width;
222 swapchain_desc.
Height =
desc->BufferDesc.Height;
223 swapchain_desc.
Format =
desc->BufferDesc.Format;
228 swapchain_desc.
Scaling = DXGI_SCALING_STRETCH;
235 fullscreen_desc.
Scaling =
desc->BufferDesc.Scaling;
238 return IWineDXGIFactory_CreateSwapChainForHwnd(&
factory->IWineDXGIFactory_iface,
239 device,
desc->OutputWindow, &swapchain_desc, &fullscreen_desc,
NULL,
256 FIXME(
"iface %p stub!\n", iface);
258 WARN(
"iface %p stub!\n", iface);
265 FIXME(
"iface %p stub!\n", iface);
276 ID3D12CommandQueue *command_queue;
279 TRACE(
"iface %p, device %p, window %p, desc %p, fullscreen_desc %p, output %p, swapchain %p.\n",
284 WARN(
"Invalid pointer.\n");
290 FIXME(
"Stereo swapchains are not supported.\n");
298 FIXME(
"Ignoring output %p.\n", output);
300 if (
SUCCEEDED(IUnknown_QueryInterface(
device, &IID_IWineDXGISwapChainFactory, (
void **)&swapchain_factory)))
302 hr = IWineDXGISwapChainFactory_create_swapchain(swapchain_factory,
304 IWineDXGISwapChainFactory_Release(swapchain_factory);
308 if (
SUCCEEDED(IUnknown_QueryInterface(
device, &IID_ID3D12CommandQueue, (
void **)&command_queue)))
311 ID3D12CommandQueue_Release(command_queue);
315 ERR(
"This is not the device we're looking for.\n");
323 FIXME(
"iface %p, device %p, window %p, desc %p, output %p, swapchain %p stub!\n",
332 FIXME(
"iface %p, resource %p, luid %p stub!\n", iface,
resource, luid);
340 FIXME(
"iface %p, window %p, message %#x, cookie %p stub!\n",
356 FIXME(
"iface %p, cookie %#lx stub!\n", iface,
cookie);
362 FIXME(
"iface %p, window %p, message %#x, cookie %p stub!\n",
378 FIXME(
"iface %p, cookie %#lx stub!\n", iface,
cookie);
384 FIXME(
"iface %p, device %p, desc %p, output %p, swapchain %p stub!\n",
392 FIXME(
"iface %p stub!\n", iface);
400 unsigned int adapter_index;
405 TRACE(
"iface %p, luid %08lx:%08lx, iid %s, adapter %p.\n",
414 if (
FAILED(
hr = IDXGIAdapter1_GetDesc1(adapter1, &
desc)))
416 WARN(
"Failed to get adapter %u desc, hr %#lx.\n", adapter_index,
hr);
424 hr = IDXGIAdapter1_QueryInterface(adapter1, iid,
adapter);
425 IDXGIAdapter1_Release(adapter1);
429 IDXGIAdapter1_Release(adapter1);
433 WARN(
"Failed to enumerate adapters, hr %#lx.\n",
hr);
435 WARN(
"Adapter could not be found.\n");
450 TRACE(
"iface %p, feature %#x, feature_data %p, data_size %u.\n",
451 iface,
feature, feature_data, data_size);
456 if (data_size !=
sizeof(
BOOL))
473 TRACE(
"iface %p, adapter_idx %u, gpu_preference %#x, iid %s, adapter %p.\n",
477 FIXME(
"Ignoring GPU preference %#x.\n", gpu_preference);
482 hr = IDXGIAdapter1_QueryInterface(adapter_object, iid,
adapter);
483 IDXGIAdapter1_Release(adapter_object);
498 FIXME(
"iface %p, cookie %#lx stub!\n", iface,
cookie);
554 if (
FAILED(
hr = IDXGIFactory_QueryInterface(iface, &IID_IWineDXGIFactory, (
void **)&wine_factory)))
556 ERR(
"Failed to get IWineDXGIFactory interface, hr %#lx.\n",
hr);
561 IWineDXGIFactory_Release(wine_factory);
590 if (!(
object =
calloc(1,
sizeof(*
object))))
595 WARN(
"Failed to initialize factory, hr %#lx.\n",
hr);
600 TRACE(
"Created factory %p.\n",
object);
603 IWineDXGIFactory_Release(&
object->IWineDXGIFactory_iface);
617 ERR(
"Failed to create a window.\n");
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
static BOOL STDMETHODCALLTYPE dxgi_factory_IsWindowedStereoEnabled(IWineDXGIFactory *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_UnregisterAdaptersChangedEvent(IWineDXGIFactory *iface, DWORD cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IWineDXGIFactory *iface, HANDLE event, DWORD *cookie)
struct dxgi_factory * unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface)
static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IWineDXGIFactory *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateDataInterface(IWineDXGIFactory *iface, REFGUID guid, const IUnknown *object)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFactory *iface, IUnknown *device, HWND window, const DXGI_SWAP_CHAIN_DESC1 *desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IWineDXGIFactory *iface, IUnknown *device, const DXGI_SWAP_CHAIN_DESC1 *desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain)
static void STDMETHODCALLTYPE dxgi_factory_UnregisterStereoStatus(IWineDXGIFactory *iface, DWORD cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IWineDXGIFactory *iface, HWND window, UINT flags)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CheckFeatureSupport(IWineDXGIFactory *iface, DXGI_FEATURE feature, void *feature_data, UINT data_size)
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetSharedResourceAdapterLuid(IWineDXGIFactory *iface, HANDLE resource, LUID *luid)
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetPrivateData(IWineDXGIFactory *iface, REFGUID guid, UINT *data_size, void *data)
static BOOL STDMETHODCALLTYPE dxgi_factory_IsCurrent(IWineDXGIFactory *iface)
static void STDMETHODCALLTYPE dxgi_factory_UnregisterOcclusionStatus(IWineDXGIFactory *iface, DWORD cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IWineDXGIFactory *iface, UINT adapter_idx, IDXGIAdapter **adapter)
static struct dxgi_factory * impl_from_IWineDXGIFactory(IWineDXGIFactory *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory *iface, LUID luid, REFIID iid, void **adapter)
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByGpuPreference(IWineDXGIFactory *iface, UINT adapter_idx, DXGI_GPU_PREFERENCE gpu_preference, REFIID iid, void **adapter)
static const struct IWineDXGIFactoryVtbl dxgi_factory_vtbl
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IWineDXGIFactory *iface, HWND window, UINT message, DWORD *cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *iface, IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain)
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended)
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterAdaptersChangedEvent(IWineDXGIFactory *iface, HANDLE event, DWORD *cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IWineDXGIFactory *iface, REFIID iid, void **out)
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IWineDXGIFactory *iface, HWND *window)
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IWineDXGIFactory *iface, HANDLE event, DWORD *cookie)
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusWindow(IWineDXGIFactory *iface, HWND window, UINT message, DWORD *cookie)
static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IWineDXGIFactory *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IWineDXGIFactory *iface, REFIID iid, void **parent)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForCoreWindow(IWineDXGIFactory *iface, IUnknown *device, IUnknown *window, const DXGI_SWAP_CHAIN_DESC1 *desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IWineDXGIFactory *iface, HMODULE swrast, IDXGIAdapter **adapter)
static UINT STDMETHODCALLTYPE dxgi_factory_GetCreationFlags(IWineDXGIFactory *iface)
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumWarpAdapter(IWineDXGIFactory *iface, REFIID iid, void **adapter)
HWND dxgi_factory_get_device_window(struct dxgi_factory *factory)
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateData(IWineDXGIFactory *iface, REFGUID guid, UINT data_size, const void *data)
static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended)
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IWineDXGIFactory *iface, UINT adapter_idx, IDXGIAdapter1 **adapter)
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter)
@ DXGI_FEATURE_PRESENT_ALLOW_TEARING
@ DXGI_GPU_PREFERENCE_UNSPECIFIED
HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGISwapChain1 **swapchain)
HRESULT dxgi_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
BOOL dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc)
HRESULT dxgi_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static D3D_DRIVER_TYPE HMODULE swrast
D3D11_SHADER_VARIABLE_DESC desc
static IHTMLWindow2 * window
INTERNETFEATURELIST feature
#define IsEqualGUID(rguid1, rguid2)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI DestroyWindow(_In_ HWND)
DXGI_ALPHA_MODE AlphaMode
DXGI_SWAP_EFFECT SwapEffect
DXGI_SAMPLE_DESC SampleDesc
DXGI_MODE_SCANLINE_ORDER ScanlineOrdering
DXGI_RATIONAL RefreshRate
DXGI_MODE_SCALING Scaling
IWineDXGIAdapter IWineDXGIAdapter_iface
IWineDXGIFactory IWineDXGIFactory_iface
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
ULONG CDECL wined3d_decref(struct wined3d *wined3d)
UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d)
static void wined3d_private_store_cleanup(struct wined3d_private_store *store)
static void wined3d_private_store_init(struct wined3d_private_store *store)
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
struct wined3d *CDECL wined3d_create(uint32_t flags)
BOOL CDECL wined3d_register_window(struct wined3d *wined3d, HWND window, struct wined3d_device *device, unsigned int flags)
void CDECL wined3d_unregister_windows(struct wined3d *wined3d)
#define DXGI_ERROR_NOT_FOUND
#define DXGI_ERROR_UNSUPPORTED
#define DXGI_ERROR_INVALID_CALL