Fixes for WRL usage - QueryInterface is explicitly mentioned as not to be used with WRL ComPtr
This commit is contained in:
parent
3c8f6bca5a
commit
799c52463e
Source/Core/VideoBackends
|
@ -81,10 +81,10 @@ bool Create(u32 adapter_index, bool enable_debug_layer)
|
||||||
D3D11_SDK_VERSION, &device, &feature_level, &context);
|
D3D11_SDK_VERSION, &device, &feature_level, &context);
|
||||||
|
|
||||||
// Debugbreak on D3D error
|
// Debugbreak on D3D error
|
||||||
if (SUCCEEDED(hr) && SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&s_debug))))
|
if (SUCCEEDED(hr) && SUCCEEDED(device.As(&s_debug)))
|
||||||
{
|
{
|
||||||
ComPtr<ID3D11InfoQueue> info_queue;
|
ComPtr<ID3D11InfoQueue> info_queue;
|
||||||
if (SUCCEEDED(s_debug->QueryInterface(IID_PPV_ARGS(&info_queue))))
|
if (SUCCEEDED(s_debug.As(&info_queue)))
|
||||||
{
|
{
|
||||||
info_queue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true);
|
info_queue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true);
|
||||||
info_queue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
|
info_queue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
|
||||||
|
@ -121,7 +121,7 @@ bool Create(u32 adapter_index, bool enable_debug_layer)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = device->QueryInterface(IID_PPV_ARGS(&device1));
|
hr = device.As(&device1);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "Missing Direct3D 11.1 support. Logical operations will not be supported.");
|
WARN_LOG(VIDEO, "Missing Direct3D 11.1 support. Logical operations will not be supported.");
|
||||||
|
|
|
@ -180,7 +180,7 @@ bool DXContext::CreateDevice(u32 adapter_index, bool enable_debug_layer)
|
||||||
if (enable_debug_layer)
|
if (enable_debug_layer)
|
||||||
{
|
{
|
||||||
ComPtr<ID3D12InfoQueue> info_queue;
|
ComPtr<ID3D12InfoQueue> info_queue;
|
||||||
if (SUCCEEDED(m_device->QueryInterface(IID_PPV_ARGS(&info_queue))))
|
if (SUCCEEDED(m_device.As(&info_queue)))
|
||||||
{
|
{
|
||||||
info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, TRUE);
|
info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, TRUE);
|
||||||
info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING, TRUE);
|
info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING, TRUE);
|
||||||
|
|
Loading…
Reference in New Issue