1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +01:00

[dxgi] Stubbed out IDXGISwapChain1

This commit is contained in:
Philip Rebohle 2018-05-22 23:50:28 +02:00
parent 979ba2d7c6
commit 5a61d81135
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 152 additions and 32 deletions

View File

@ -73,7 +73,8 @@ namespace dxvk {
if (riid == __uuidof(IUnknown) if (riid == __uuidof(IUnknown)
|| riid == __uuidof(IDXGIObject) || riid == __uuidof(IDXGIObject)
|| riid == __uuidof(IDXGIDeviceSubObject) || riid == __uuidof(IDXGIDeviceSubObject)
|| riid == __uuidof(IDXGISwapChain)) { || riid == __uuidof(IDXGISwapChain)
|| riid == __uuidof(IDXGISwapChain1)) {
*ppvObject = ref(this); *ppvObject = ref(this);
return S_OK; return S_OK;
} }
@ -142,6 +143,35 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetDesc1(DXGI_SWAP_CHAIN_DESC1* pDesc) {
Logger::err("DxgiSwapChain::GetDesc1: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetBackgroundColor(
DXGI_RGBA* pColor) {
Logger::err("DxgiSwapChain::GetBackgroundColor: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetRotation(
DXGI_MODE_ROTATION* pRotation) {
Logger::err("DxgiSwapChain::GetRotation: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetRestrictToOutput(
IDXGIOutput** ppRestrictToOutput) {
InitReturnPtr(ppRestrictToOutput);
Logger::err("DxgiSwapChain::GetRestrictToOutput: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) { HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) {
std::lock_guard<std::recursive_mutex> lock(m_mutex); std::lock_guard<std::recursive_mutex> lock(m_mutex);
@ -177,6 +207,28 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetFullscreenDesc(
DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc) {
Logger::err("DxgiSwapChain::GetFullscreenDesc: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetHwnd(
HWND* pHwnd) {
Logger::err("DxgiSwapChain::GetHwnd: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetCoreWindow(
REFIID refiid,
void** ppUnk) {
Logger::err("DxgiSwapChain::GetCoreWindow: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetLastPresentCount(UINT* pLastPresentCount) { HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetLastPresentCount(UINT* pLastPresentCount) {
std::lock_guard<std::recursive_mutex> lock(m_mutex); std::lock_guard<std::recursive_mutex> lock(m_mutex);
@ -188,6 +240,13 @@ namespace dxvk {
} }
BOOL STDMETHODCALLTYPE DxgiSwapChain::IsTemporaryMonoSupported() {
// This seems to be related to stereo 3D display
// modes, which we don't support at the moment
return FALSE;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present(UINT SyncInterval, UINT Flags) { HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present(UINT SyncInterval, UINT Flags) {
std::lock_guard<std::recursive_mutex> lock(m_mutex); std::lock_guard<std::recursive_mutex> lock(m_mutex);
@ -235,6 +294,17 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present1(
UINT SyncInterval,
UINT PresentFlags,
const DXGI_PRESENT_PARAMETERS* pPresentParameters) {
if (pPresentParameters != nullptr)
Logger::warn("DXGI: Present parameters not supported");
return Present(SyncInterval, PresentFlags);
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeBuffers( HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeBuffers(
UINT BufferCount, UINT BufferCount,
UINT Width, UINT Width,
@ -335,6 +405,20 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE DxgiSwapChain::SetBackgroundColor(
const DXGI_RGBA* pColor) {
Logger::err("DxgiSwapChain::SetBackgroundColor: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::SetRotation(
DXGI_MODE_ROTATION Rotation) {
Logger::err("DxgiSwapChain::SetRotation: Not implemented");
return E_NOTIMPL;
}
HRESULT DxgiSwapChain::SetGammaControl(const DXGI_GAMMA_CONTROL* pGammaControl) { HRESULT DxgiSwapChain::SetGammaControl(const DXGI_GAMMA_CONTROL* pGammaControl) {
std::lock_guard<std::recursive_mutex> lock(m_mutex); std::lock_guard<std::recursive_mutex> lock(m_mutex);

View File

@ -20,69 +20,105 @@ namespace dxvk {
class DxgiFactory; class DxgiFactory;
class DxgiOutput; class DxgiOutput;
class DxgiSwapChain : public DxgiObject<IDXGISwapChain> { class DxgiSwapChain : public DxgiObject<IDXGISwapChain1> {
public: public:
DxgiSwapChain( DxgiSwapChain(
DxgiFactory* factory, DxgiFactory* factory,
IUnknown* pDevice, IUnknown* pDevice,
DXGI_SWAP_CHAIN_DESC* pDesc); DXGI_SWAP_CHAIN_DESC* pDesc);
~DxgiSwapChain(); ~DxgiSwapChain();
HRESULT STDMETHODCALLTYPE QueryInterface( HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid, REFIID riid,
void** ppvObject) final; void** ppvObject) final;
HRESULT STDMETHODCALLTYPE GetParent( HRESULT STDMETHODCALLTYPE GetParent(
REFIID riid, REFIID riid,
void** ppParent) final; void** ppParent) final;
HRESULT STDMETHODCALLTYPE GetDevice( HRESULT STDMETHODCALLTYPE GetDevice(
REFIID riid, REFIID riid,
void** ppDevice) final; void** ppDevice) final;
HRESULT STDMETHODCALLTYPE GetBuffer( HRESULT STDMETHODCALLTYPE GetBuffer(
UINT Buffer, UINT Buffer,
REFIID riid, REFIID riid,
void** ppSurface) final; void** ppSurface) final;
HRESULT STDMETHODCALLTYPE GetContainingOutput( HRESULT STDMETHODCALLTYPE GetContainingOutput(
IDXGIOutput** ppOutput) final; IDXGIOutput** ppOutput) final;
HRESULT STDMETHODCALLTYPE GetDesc( HRESULT STDMETHODCALLTYPE GetDesc(
DXGI_SWAP_CHAIN_DESC* pDesc) final; DXGI_SWAP_CHAIN_DESC* pDesc) final;
HRESULT STDMETHODCALLTYPE GetFrameStatistics( HRESULT STDMETHODCALLTYPE GetDesc1(
DXGI_FRAME_STATISTICS* pStats) final; DXGI_SWAP_CHAIN_DESC1* pDesc) final;
HRESULT STDMETHODCALLTYPE GetFullscreenState( HRESULT STDMETHODCALLTYPE GetFullscreenState(
BOOL* pFullscreen, BOOL* pFullscreen,
IDXGIOutput** ppTarget) final; IDXGIOutput** ppTarget) final;
HRESULT STDMETHODCALLTYPE GetFullscreenDesc(
DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc) final;
HRESULT STDMETHODCALLTYPE GetHwnd(
HWND* pHwnd) final;
HRESULT STDMETHODCALLTYPE GetCoreWindow(
REFIID refiid,
void** ppUnk) final;
HRESULT STDMETHODCALLTYPE GetBackgroundColor(
DXGI_RGBA* pColor) final;
HRESULT STDMETHODCALLTYPE GetRotation(
DXGI_MODE_ROTATION* pRotation) final;
HRESULT STDMETHODCALLTYPE GetRestrictToOutput(
IDXGIOutput** ppRestrictToOutput) final;
HRESULT STDMETHODCALLTYPE GetFrameStatistics(
DXGI_FRAME_STATISTICS* pStats) final;
HRESULT STDMETHODCALLTYPE GetLastPresentCount( HRESULT STDMETHODCALLTYPE GetLastPresentCount(
UINT* pLastPresentCount) final; UINT* pLastPresentCount) final;
BOOL STDMETHODCALLTYPE IsTemporaryMonoSupported() final;
HRESULT STDMETHODCALLTYPE Present( HRESULT STDMETHODCALLTYPE Present(
UINT SyncInterval, UINT SyncInterval,
UINT Flags) final; UINT Flags) final;
HRESULT STDMETHODCALLTYPE Present1(
UINT SyncInterval,
UINT PresentFlags,
const DXGI_PRESENT_PARAMETERS* pPresentParameters) final;
HRESULT STDMETHODCALLTYPE ResizeBuffers( HRESULT STDMETHODCALLTYPE ResizeBuffers(
UINT BufferCount, UINT BufferCount,
UINT Width, UINT Width,
UINT Height, UINT Height,
DXGI_FORMAT NewFormat, DXGI_FORMAT NewFormat,
UINT SwapChainFlags) final; UINT SwapChainFlags) final;
HRESULT STDMETHODCALLTYPE ResizeTarget( HRESULT STDMETHODCALLTYPE ResizeTarget(
const DXGI_MODE_DESC* pNewTargetParameters) final; const DXGI_MODE_DESC* pNewTargetParameters) final;
HRESULT STDMETHODCALLTYPE SetFullscreenState( HRESULT STDMETHODCALLTYPE SetFullscreenState(
BOOL Fullscreen, BOOL Fullscreen,
IDXGIOutput* pTarget) final; IDXGIOutput* pTarget) final;
HRESULT STDMETHODCALLTYPE SetBackgroundColor(
const DXGI_RGBA* pColor) final;
HRESULT STDMETHODCALLTYPE SetRotation(
DXGI_MODE_ROTATION Rotation) final;
HRESULT SetGammaControl( HRESULT SetGammaControl(
const DXGI_GAMMA_CONTROL* pGammaControl); const DXGI_GAMMA_CONTROL* pGammaControl);
HRESULT SetDefaultGammaControl(); HRESULT SetDefaultGammaControl();