Skip to content

Commit

Permalink
D3D12: Fix spectator view bugs with backbuffer array > 3
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Feb 3, 2025
1 parent 4252ef7 commit fe8756d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mods/vr/D3D12Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,8 @@ void D3D12Component::draw_spectator_view(ID3D12GraphicsCommandList* command_list
}

// Copy the previous right eye frame to the left eye frame
if (vr->is_using_afr() && !is_right_eye_frame && m_backbuffer_textures[(index + 2) % m_backbuffer_textures.size()]->texture != nullptr) {
const auto& last_right_eye_buffer = m_backbuffer_textures[(index + 2) % m_backbuffer_textures.size()]->texture;
if (vr->is_using_afr() && !is_right_eye_frame && m_backbuffer_textures[(index - 1) % m_backbuffer_textures.size()]->texture != nullptr) {
const auto& last_right_eye_buffer = m_backbuffer_textures[(index - 1) % m_backbuffer_textures.size()]->texture;

if (backbuffer.Get() != last_right_eye_buffer.Get()) {
m_generic_commands[index % 3].wait(INFINITE);
Expand Down

0 comments on commit fe8756d

Please sign in to comment.