MCPcopy Create free account
hub / github.com/crosire/reshade / AddToStateObject

Method AddToStateObject

source/d3d12/d3d12_device.cpp:1482–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1480}
1481
1482HRESULT 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}
1506HRESULT STDMETHODCALLTYPE D3D12Device::CreateProtectedResourceSession1(const D3D12_PROTECTED_RESOURCE_SESSION_DESC1 *pDesc, REFIID riid, void **ppSession)
1507{
1508 assert(_interface_version >= 7);

Calls 2

messageFunction · 0.85
hr_to_stringFunction · 0.85

Tested by

no test coverage detected