Commit 7d99d745 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Add IDXGISwapChain3 interface stub for D3D12.

parent 02c49ea3
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
#include "objbase.h" #include "objbase.h"
#include "winnls.h" #include "winnls.h"
#include "d3d10_1.h"
#include "dxgi1_6.h" #include "dxgi1_6.h"
#include "d3d10_1.h"
#include "d3d12.h"
#ifdef DXGI_INIT_GUID #ifdef DXGI_INIT_GUID
#include "initguid.h" #include "initguid.h"
#endif #endif
...@@ -178,6 +179,10 @@ HRESULT d3d11_swapchain_create(IWineDXGIDevice *device, HWND window, const DXGI_ ...@@ -178,6 +179,10 @@ HRESULT d3d11_swapchain_create(IWineDXGIDevice *device, HWND window, const DXGI_
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device,
struct wined3d_swapchain_desc *desc, BOOL implicit) DECLSPEC_HIDDEN; struct wined3d_swapchain_desc *desc, BOOL implicit) DECLSPEC_HIDDEN;
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) DECLSPEC_HIDDEN;
/* IDXGISurface */ /* IDXGISurface */
struct dxgi_surface struct dxgi_surface
{ {
......
...@@ -250,6 +250,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa ...@@ -250,6 +250,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc,
IDXGIOutput *output, IDXGISwapChain1 **swapchain) IDXGIOutput *output, IDXGISwapChain1 **swapchain)
{ {
ID3D12CommandQueue *command_queue;
unsigned int min_buffer_count; unsigned int min_buffer_count;
IWineDXGIDevice *dxgi_device; IWineDXGIDevice *dxgi_device;
HRESULT hr; HRESULT hr;
...@@ -300,6 +301,13 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa ...@@ -300,6 +301,13 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa
return hr; return hr;
} }
if (SUCCEEDED(IUnknown_QueryInterface(device, &IID_ID3D12CommandQueue, (void **)&command_queue)))
{
hr = d3d12_swapchain_create(iface, command_queue, window, swapchain_desc, fullscreen_desc, swapchain);
ID3D12CommandQueue_Release(command_queue);
return hr;
}
ERR("This is not the device we're looking for.\n"); ERR("This is not the device we're looking for.\n");
return DXGI_ERROR_UNSUPPORTED; return DXGI_ERROR_UNSUPPORTED;
} }
......
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