1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[dxgi] Stubbed out IDXGIFactory2

This commit is contained in:
Philip Rebohle 2018-05-22 23:52:03 +02:00
parent 5a61d81135
commit 56e7389495
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 154 additions and 3 deletions

View File

@ -22,7 +22,8 @@ namespace dxvk {
if (riid == __uuidof(IUnknown) if (riid == __uuidof(IUnknown)
|| riid == __uuidof(IDXGIObject) || riid == __uuidof(IDXGIObject)
|| riid == __uuidof(IDXGIFactory) || riid == __uuidof(IDXGIFactory)
|| riid == __uuidof(IDXGIFactory1)) { || riid == __uuidof(IDXGIFactory1)
|| riid == __uuidof(IDXGIFactory2)) {
*ppvObject = ref(this); *ppvObject = ref(this);
return S_OK; return S_OK;
} }
@ -41,6 +42,12 @@ namespace dxvk {
} }
BOOL STDMETHODCALLTYPE DxgiFactory::IsWindowedStereoEnabled() {
// We don't support Stereo 3D at the moment
return FALSE;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSoftwareAdapter( HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSoftwareAdapter(
HMODULE Module, HMODULE Module,
IDXGIAdapter** ppAdapter) { IDXGIAdapter** ppAdapter) {
@ -76,6 +83,45 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSwapChainForHwnd(
IUnknown* pDevice,
HWND hWnd,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) {
InitReturnPtr(ppSwapChain);
Logger::err("DxgiFactory::CreateSwapChainForHwnd: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSwapChainForCoreWindow(
IUnknown* pDevice,
IUnknown* pWindow,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) {
InitReturnPtr(ppSwapChain);
Logger::err("DxgiFactory::CreateSwapChainForCoreWindow: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSwapChainForComposition(
IUnknown* pDevice,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) {
InitReturnPtr(ppSwapChain);
Logger::err("DxgiFactory::CreateSwapChainForComposition: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::EnumAdapters( HRESULT STDMETHODCALLTYPE DxgiFactory::EnumAdapters(
UINT Adapter, UINT Adapter,
IDXGIAdapter** ppAdapter) { IDXGIAdapter** ppAdapter) {
@ -117,6 +163,14 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiFactory::GetSharedResourceAdapterLuid(
HANDLE hResource,
LUID* pLuid) {
Logger::err("DxgiFactory::GetSharedResourceAdapterLuid: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) { HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) {
Logger::warn("DXGI: MakeWindowAssociation: Ignoring flags"); Logger::warn("DXGI: MakeWindowAssociation: Ignoring flags");
m_associatedWindow = WindowHandle; m_associatedWindow = WindowHandle;
@ -129,4 +183,50 @@ namespace dxvk {
return TRUE; return TRUE;
} }
HRESULT STDMETHODCALLTYPE DxgiFactory::RegisterOcclusionStatusWindow(
HWND WindowHandle,
UINT wMsg,
DWORD* pdwCookie) {
Logger::err("DxgiFactory::RegisterOcclusionStatusWindow: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::RegisterStereoStatusEvent(
HANDLE hEvent,
DWORD* pdwCookie) {
Logger::err("DxgiFactory::RegisterStereoStatusEvent: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::RegisterStereoStatusWindow(
HWND WindowHandle,
UINT wMsg,
DWORD* pdwCookie) {
Logger::err("DxgiFactory::RegisterStereoStatusWindow: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::RegisterOcclusionStatusEvent(
HANDLE hEvent,
DWORD* pdwCookie) {
Logger::err("DxgiFactory::RegisterOcclusionStatusEvent: Not implemented");
return E_NOTIMPL;
}
void STDMETHODCALLTYPE DxgiFactory::UnregisterStereoStatus(
DWORD dwCookie) {
Logger::err("DxgiFactory::UnregisterStereoStatus: Not implemented");
}
void STDMETHODCALLTYPE DxgiFactory::UnregisterOcclusionStatus(
DWORD dwCookie) {
Logger::err("DxgiFactory::UnregisterOcclusionStatus: Not implemented");
}
} }

View File

@ -8,7 +8,7 @@
namespace dxvk { namespace dxvk {
class DxgiFactory : public DxgiObject<IDXGIFactory1> { class DxgiFactory : public DxgiObject<IDXGIFactory2> {
public: public:
@ -23,6 +23,8 @@ namespace dxvk {
REFIID riid, REFIID riid,
void** ppParent) final; void** ppParent) final;
BOOL STDMETHODCALLTYPE IsWindowedStereoEnabled() final;
HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter( HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter(
HMODULE Module, HMODULE Module,
IDXGIAdapter** ppAdapter) final; IDXGIAdapter** ppAdapter) final;
@ -32,6 +34,27 @@ namespace dxvk {
DXGI_SWAP_CHAIN_DESC* pDesc, DXGI_SWAP_CHAIN_DESC* pDesc,
IDXGISwapChain** ppSwapChain) final; IDXGISwapChain** ppSwapChain) final;
HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd(
IUnknown* pDevice,
HWND hWnd,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) final;
HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow(
IUnknown* pDevice,
IUnknown* pWindow,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) final;
HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition(
IUnknown* pDevice,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
IDXGIOutput* pRestrictToOutput,
IDXGISwapChain1** ppSwapChain) final;
HRESULT STDMETHODCALLTYPE EnumAdapters( HRESULT STDMETHODCALLTYPE EnumAdapters(
UINT Adapter, UINT Adapter,
IDXGIAdapter** ppAdapter) final; IDXGIAdapter** ppAdapter) final;
@ -43,11 +66,39 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE GetWindowAssociation( HRESULT STDMETHODCALLTYPE GetWindowAssociation(
HWND* pWindowHandle) final; HWND* pWindowHandle) final;
HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(
HANDLE hResource,
LUID* pLuid) final;
HRESULT STDMETHODCALLTYPE MakeWindowAssociation( HRESULT STDMETHODCALLTYPE MakeWindowAssociation(
HWND WindowHandle, HWND WindowHandle,
UINT Flags) final; UINT Flags) final;
BOOL STDMETHODCALLTYPE IsCurrent(); BOOL STDMETHODCALLTYPE IsCurrent() final;
HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(
HWND WindowHandle,
UINT wMsg,
DWORD* pdwCookie) final;
HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(
HANDLE hEvent,
DWORD* pdwCookie) final;
HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(
HWND WindowHandle,
UINT wMsg,
DWORD* pdwCookie) final;
HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent(
HANDLE hEvent,
DWORD* pdwCookie) final;
void STDMETHODCALLTYPE UnregisterStereoStatus(
DWORD dwCookie) final;
void STDMETHODCALLTYPE UnregisterOcclusionStatus(
DWORD dwCookie) final;
private: private: