mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Implement IDXGIFactory5
This commit is contained in:
parent
9ed980a962
commit
3e8a6ec463
@ -30,7 +30,8 @@ namespace dxvk {
|
|||||||
|| riid == __uuidof(IDXGIFactory1)
|
|| riid == __uuidof(IDXGIFactory1)
|
||||||
|| riid == __uuidof(IDXGIFactory2)
|
|| riid == __uuidof(IDXGIFactory2)
|
||||||
|| riid == __uuidof(IDXGIFactory3)
|
|| riid == __uuidof(IDXGIFactory3)
|
||||||
|| riid == __uuidof(IDXGIFactory4)) {
|
|| riid == __uuidof(IDXGIFactory4)
|
||||||
|
|| riid == __uuidof(IDXGIFactory5)) {
|
||||||
*ppvObject = ref(this);
|
*ppvObject = ref(this);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@ -311,4 +312,25 @@ namespace dxvk {
|
|||||||
return m_flags;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
class DxgiFactory : public DxgiObject<IDXGIFactory4> {
|
class DxgiFactory : public DxgiObject<IDXGIFactory5> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -113,6 +113,11 @@ namespace dxvk {
|
|||||||
|
|
||||||
UINT STDMETHODCALLTYPE GetCreationFlags() final;
|
UINT STDMETHODCALLTYPE GetCreationFlags() final;
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE CheckFeatureSupport(
|
||||||
|
DXGI_FEATURE Feature,
|
||||||
|
void* pFeatureSupportData,
|
||||||
|
UINT FeatureSupportDataSize) final;
|
||||||
|
|
||||||
const DxgiOptions* GetOptions() const {
|
const DxgiOptions* GetOptions() const {
|
||||||
return &m_options;
|
return &m_options;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user