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:
parent
979ba2d7c6
commit
5a61d81135
@ -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);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace dxvk {
|
|||||||
class DxgiFactory;
|
class DxgiFactory;
|
||||||
class DxgiOutput;
|
class DxgiOutput;
|
||||||
|
|
||||||
class DxgiSwapChain : public DxgiObject<IDXGISwapChain> {
|
class DxgiSwapChain : public DxgiObject<IDXGISwapChain1> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ namespace dxvk {
|
|||||||
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(
|
||||||
@ -53,20 +54,49 @@ namespace dxvk {
|
|||||||
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,
|
||||||
@ -81,6 +111,12 @@ namespace dxvk {
|
|||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user