Skip to content

Commit b9ce85a

Browse files
committed
D3D12: Possible fix for non-resident texture crashes
1 parent 2763070 commit b9ce85a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/mods/vr/D3D12Component.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ vr::EVRCompositorError D3D12Component::on_frame(VR* vr) {
263263
ffsr->set_should_recreate_textures(true);
264264
}
265265
}
266+
} else {
267+
m_game_ui_tex.reset(); // Probably fixes non-resident errors.
266268
}
267269

268270
const float clear_color[] = { 0.0f, 0.0f, 0.0f, 0.0f };

src/mods/vr/FFakeStereoRenderingHook.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6835,6 +6835,7 @@ void VRRenderTargetManager_Base::texture_hook_callback(safetyhook::Context& ctx,
68356835
if (!rtm->allocate_texture_called) {
68366836
g_hook->set_should_recreate_textures(true);
68376837
rtm->render_target = nullptr;
6838+
rtm->ui_target = nullptr;
68386839
rtm->texture_hook_ref = nullptr;
68396840

68406841
SPDLOG_INFO("[Post texture hook] Allocate texture was not called, skipping...");

0 commit comments

Comments
 (0)