1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d8] Automatically capture state on state block creation

This commit is contained in:
WinterSnowfall 2024-10-04 09:35:49 +03:00 committed by Philip Rebohle
parent 050886d08a
commit 87a7882812

View File

@ -1089,10 +1089,13 @@ namespace dxvk {
if (likely(SUCCEEDED(res))) {
m_token++;
m_stateBlocks.emplace(std::piecewise_construct,
std::forward_as_tuple(m_token),
std::forward_as_tuple(this, Type, pStateBlock9.ref()));
auto stateBlockIterPair = m_stateBlocks.emplace(std::piecewise_construct,
std::forward_as_tuple(m_token),
std::forward_as_tuple(this, Type, pStateBlock9.ref()));
*pToken = m_token;
// D3D8 state blocks automatically capture state on creation.
stateBlockIterPair.first->second.Capture();
}
return res;