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:
parent
9ed980a962
commit
3e8a6ec463
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user