mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Implement IDXGISwapChain3
- Stub IDXGISwapChain3::ResizeBuffers1
This commit is contained in:
parent
81bb561c75
commit
c25483e856
@ -59,7 +59,8 @@ namespace dxvk {
|
|||||||
|| riid == __uuidof(IDXGIDeviceSubObject)
|
|| riid == __uuidof(IDXGIDeviceSubObject)
|
||||||
|| riid == __uuidof(IDXGISwapChain)
|
|| riid == __uuidof(IDXGISwapChain)
|
||||||
|| riid == __uuidof(IDXGISwapChain1)
|
|| riid == __uuidof(IDXGISwapChain1)
|
||||||
|| riid == __uuidof(IDXGISwapChain2)) {
|
|| riid == __uuidof(IDXGISwapChain2)
|
||||||
|
|| riid == __uuidof(IDXGISwapChain3)) {
|
||||||
*ppvObject = ref(this);
|
*ppvObject = ref(this);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@ -83,6 +84,11 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetBuffer(UINT Buffer, REFIID riid, void** ppSurface) {
|
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetBuffer(UINT Buffer, REFIID riid, void** ppSurface) {
|
||||||
return m_presenter->GetImage(Buffer, riid, ppSurface);
|
return m_presenter->GetImage(Buffer, riid, ppSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
UINT STDMETHODCALLTYPE DxgiSwapChain::GetCurrentBackBufferIndex() {
|
||||||
|
return m_presenter->GetImageIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetContainingOutput(IDXGIOutput** ppOutput) {
|
HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetContainingOutput(IDXGIOutput** ppOutput) {
|
||||||
@ -302,6 +308,24 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeBuffers1(
|
||||||
|
UINT BufferCount,
|
||||||
|
UINT Width,
|
||||||
|
UINT Height,
|
||||||
|
DXGI_FORMAT Format,
|
||||||
|
UINT SwapChainFlags,
|
||||||
|
const UINT* pCreationNodeMask,
|
||||||
|
IUnknown* const* ppPresentQueue) {
|
||||||
|
static bool s_errorShown = false;
|
||||||
|
|
||||||
|
if (!std::exchange(s_errorShown, true))
|
||||||
|
Logger::warn("DxgiSwapChain::ResizeBuffers1: Stub");
|
||||||
|
|
||||||
|
return ResizeBuffers(BufferCount,
|
||||||
|
Width, Height, Format, SwapChainFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeTarget(const DXGI_MODE_DESC* pNewTargetParameters) {
|
HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeTarget(const DXGI_MODE_DESC* pNewTargetParameters) {
|
||||||
std::lock_guard<std::mutex> lock(m_lockWindow);
|
std::lock_guard<std::mutex> lock(m_lockWindow);
|
||||||
|
|
||||||
@ -448,6 +472,22 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DxgiSwapChain::CheckColorSpaceSupport(
|
||||||
|
DXGI_COLOR_SPACE_TYPE ColorSpace,
|
||||||
|
UINT* pColorSpaceSupport) {
|
||||||
|
Logger::err("DxgiSwapChain::CheckColorSpaceSupport: Not implemented");
|
||||||
|
|
||||||
|
*pColorSpaceSupport = 0;
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT DxgiSwapChain::SetColorSpace1(DXGI_COLOR_SPACE_TYPE ColorSpace) {
|
||||||
|
Logger::err("DxgiSwapChain::SetColorSpace1: Not implemented");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT DxgiSwapChain::SetGammaControl(const DXGI_GAMMA_CONTROL* pGammaControl) {
|
HRESULT DxgiSwapChain::SetGammaControl(const DXGI_GAMMA_CONTROL* pGammaControl) {
|
||||||
return m_presenter->SetGammaControl(DXGI_VK_GAMMA_CP_COUNT, pGammaControl->GammaCurve);
|
return m_presenter->SetGammaControl(DXGI_VK_GAMMA_CP_COUNT, pGammaControl->GammaCurve);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace dxvk {
|
|||||||
class DxgiFactory;
|
class DxgiFactory;
|
||||||
class DxgiOutput;
|
class DxgiOutput;
|
||||||
|
|
||||||
class DxgiSwapChain : public DxgiObject<IDXGISwapChain2> {
|
class DxgiSwapChain : public DxgiObject<IDXGISwapChain3> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -49,6 +49,8 @@ namespace dxvk {
|
|||||||
REFIID riid,
|
REFIID riid,
|
||||||
void** ppSurface) final;
|
void** ppSurface) final;
|
||||||
|
|
||||||
|
UINT STDMETHODCALLTYPE GetCurrentBackBufferIndex() final;
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE GetContainingOutput(
|
HRESULT STDMETHODCALLTYPE GetContainingOutput(
|
||||||
IDXGIOutput** ppOutput) final;
|
IDXGIOutput** ppOutput) final;
|
||||||
|
|
||||||
@ -105,6 +107,15 @@ namespace dxvk {
|
|||||||
DXGI_FORMAT NewFormat,
|
DXGI_FORMAT NewFormat,
|
||||||
UINT SwapChainFlags) final;
|
UINT SwapChainFlags) final;
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE ResizeBuffers1(
|
||||||
|
UINT BufferCount,
|
||||||
|
UINT Width,
|
||||||
|
UINT Height,
|
||||||
|
DXGI_FORMAT Format,
|
||||||
|
UINT SwapChainFlags,
|
||||||
|
const UINT* pCreationNodeMask,
|
||||||
|
IUnknown* const* ppPresentQueue) final;
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE ResizeTarget(
|
HRESULT STDMETHODCALLTYPE ResizeTarget(
|
||||||
const DXGI_MODE_DESC* pNewTargetParameters) final;
|
const DXGI_MODE_DESC* pNewTargetParameters) final;
|
||||||
|
|
||||||
@ -139,6 +150,13 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE SetSourceSize(
|
HRESULT STDMETHODCALLTYPE SetSourceSize(
|
||||||
UINT Width,
|
UINT Width,
|
||||||
UINT Height) final;
|
UINT Height) final;
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE CheckColorSpaceSupport(
|
||||||
|
DXGI_COLOR_SPACE_TYPE ColorSpace,
|
||||||
|
UINT* pColorSpaceSupport) final;
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE SetColorSpace1(
|
||||||
|
DXGI_COLOR_SPACE_TYPE ColorSpace) final;
|
||||||
|
|
||||||
HRESULT SetGammaControl(
|
HRESULT SetGammaControl(
|
||||||
const DXGI_GAMMA_CONTROL* pGammaControl);
|
const DXGI_GAMMA_CONTROL* pGammaControl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user