| 1480 | } |
| 1481 | |
| 1482 | HRESULT STDMETHODCALLTYPE D3D12Device::AddToStateObject(const D3D12_STATE_OBJECT_DESC *pAddition, ID3D12StateObject *pStateObjectToGrowFrom, REFIID riid, void **ppNewStateObject) |
| 1483 | { |
| 1484 | assert(_interface_version >= 7); |
| 1485 | |
| 1486 | if (pAddition == nullptr) |
| 1487 | return E_INVALIDARG; |
| 1488 | |
| 1489 | HRESULT hr = S_OK; |
| 1490 | #if RESHADE_ADDON >= 2 |
| 1491 | if (ppNewStateObject == nullptr || |
| 1492 | riid != __uuidof(ID3D12StateObject) || |
| 1493 | !invoke_create_and_init_pipeline_event(*pAddition, pStateObjectToGrowFrom, *reinterpret_cast<ID3D12StateObject **>(ppNewStateObject), hr)) |
| 1494 | #endif |
| 1495 | hr = static_cast<ID3D12Device7 *>(_orig)->AddToStateObject(pAddition, pStateObjectToGrowFrom, riid, ppNewStateObject); |
| 1496 | |
| 1497 | #if RESHADE_VERBOSE_LOG |
| 1498 | if (FAILED(hr) && ppNewStateObject != nullptr) |
| 1499 | { |
| 1500 | reshade::log::message(reshade::log::level::warning, "ID3D12Device7::AddToStateObject failed with error code %s.", reshade::log::hr_to_string(hr).c_str()); |
| 1501 | } |
| 1502 | #endif |
| 1503 | |
| 1504 | return hr; |
| 1505 | } |
| 1506 | HRESULT STDMETHODCALLTYPE D3D12Device::CreateProtectedResourceSession1(const D3D12_PROTECTED_RESOURCE_SESSION_DESC1 *pDesc, REFIID riid, void **ppSession) |
| 1507 | { |
| 1508 | assert(_interface_version >= 7); |
no test coverage detected