1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxgi] Implement IDXGIFactory5

This commit is contained in:
Philip Rebohle 2019-09-19 16:38:01 +02:00
parent 9ed980a962
commit 3e8a6ec463
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 31 additions and 4 deletions

View File

@ -30,7 +30,8 @@ namespace dxvk {
|| riid == __uuidof(IDXGIFactory1)
|| riid == __uuidof(IDXGIFactory2)
|| riid == __uuidof(IDXGIFactory3)
|| riid == __uuidof(IDXGIFactory4)) {
|| riid == __uuidof(IDXGIFactory4)
|| riid == __uuidof(IDXGIFactory5)) {
*ppvObject = ref(this);
return S_OK;
}
@ -310,5 +311,26 @@ namespace dxvk {
UINT STDMETHODCALLTYPE DxgiFactory::GetCreationFlags() {
return m_flags;
}
HRESULT STDMETHODCALLTYPE DxgiFactory::CheckFeatureSupport(
DXGI_FEATURE Feature,
void* pFeatureSupportData,
UINT FeatureSupportDataSize) {
switch (Feature) {
case DXGI_FEATURE_PRESENT_ALLOW_TEARING: {
auto info = static_cast<BOOL*>(pFeatureSupportData);
if (FeatureSupportDataSize != sizeof(*info))
return E_INVALIDARG;
*info = TRUE;
} return S_OK;
default:
Logger::err(str::format("DxgiFactory: CheckFeatureSupport: Unknown feature: ", uint32_t(Feature)));
return E_INVALIDARG;
}
}
}

View File

@ -10,7 +10,7 @@
namespace dxvk {
class DxgiFactory : public DxgiObject<IDXGIFactory4> {
class DxgiFactory : public DxgiObject<IDXGIFactory5> {
public:
@ -112,7 +112,12 @@ namespace dxvk {
DWORD dwCookie) final;
UINT STDMETHODCALLTYPE GetCreationFlags() final;
HRESULT STDMETHODCALLTYPE CheckFeatureSupport(
DXGI_FEATURE Feature,
void* pFeatureSupportData,
UINT FeatureSupportDataSize) final;
const DxgiOptions* GetOptions() const {
return &m_options;
}