Merge pull request #6013 from stenzek/d3d-logic-op

D3D: Implement logic op support
This commit is contained in:
Anthony
2017-09-03 19:26:50 -07:00
committed by GitHub
16 changed files with 176 additions and 58 deletions

View File

@ -33,6 +33,7 @@ int d3d_dll_ref = 0;
namespace D3D
{
ID3D11Device* device = nullptr;
ID3D11Device1* device1 = nullptr;
ID3D11DeviceContext* context = nullptr;
static IDXGISwapChain1* swapchain = nullptr;
static ID3D11Debug* debug = nullptr;
@ -376,6 +377,10 @@ HRESULT Create(HWND wnd)
return E_FAIL;
}
hr = device->QueryInterface<ID3D11Device1>(&device1);
if (FAILED(hr))
WARN_LOG(VIDEO, "Missing Direct3D 11.1 support. Logical operations will not be supported.");
// prevent DXGI from responding to Alt+Enter, unfortunately DXGI_MWA_NO_ALT_ENTER
// does not work so we disable all monitoring of window messages. However this
// may make it more difficult for DXGI to handle display mode changes.
@ -438,6 +443,7 @@ void Close()
context->Flush(); // immediately destroy device objects
SAFE_RELEASE(context);
SAFE_RELEASE(device1);
ULONG references = device->Release();
#if defined(_DEBUG) || defined(DEBUGFAST)