Browse Source

Revert "Try to implement a frame interpolation / skipping method"

This reverts commit f2a7c1317f.
pull/212/head
Gamer64 7 months ago
parent
commit
eae48c2658
  1. 2
      src/common/settings.h
  2. 9
      src/video_core/gpu_thread.cpp

2
src/common/settings.h

@ -322,9 +322,9 @@ struct Values {
SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer, SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer,
Specialization::RuntimeList}; Specialization::RuntimeList};
SwitchableSetting<bool> enable_raii{linkage, false, "enable_raii", Category::Renderer}; SwitchableSetting<bool> enable_raii{linkage, false, "enable_raii", Category::Renderer};
#ifdef __ANDROID__
SwitchableSetting<bool> frame_interpolation{linkage, true, "frame_interpolation", Category::Renderer, SwitchableSetting<bool> frame_interpolation{linkage, true, "frame_interpolation", Category::Renderer,
Specialization::RuntimeList}; Specialization::RuntimeList};
#ifdef __ANDROID__
SwitchableSetting<bool> frame_skipping{linkage, false, "frame_skipping", Category::Renderer, SwitchableSetting<bool> frame_skipping{linkage, false, "frame_skipping", Category::Renderer,
Specialization::RuntimeList}; Specialization::RuntimeList};
#endif #endif

9
src/video_core/gpu_thread.cpp

@ -37,7 +37,6 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
VideoCore::RasterizerInterface* const rasterizer = renderer.ReadRasterizer(); VideoCore::RasterizerInterface* const rasterizer = renderer.ReadRasterizer();
CommandDataContainer next; CommandDataContainer next;
size_t frame_counter = 0;
while (!stop_token.stop_requested()) { while (!stop_token.stop_requested()) {
state.queue.PopWait(next, stop_token); state.queue.PopWait(next, stop_token);
@ -45,15 +44,7 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
break; break;
} }
if (auto* submit_list = std::get_if<SubmitListCommand>(&next.data)) { if (auto* submit_list = std::get_if<SubmitListCommand>(&next.data)) {
bool skip_frame = false;
if (Settings::values.frame_interpolation.GetValue()) {
// Skip every other frame
skip_frame = (frame_counter % 2 == 1);
frame_counter++;
}
if (!skip_frame) {
scheduler.Push(submit_list->channel, std::move(submit_list->entries)); scheduler.Push(submit_list->channel, std::move(submit_list->entries));
}
} else if (std::holds_alternative<GPUTickCommand>(next.data)) { } else if (std::holds_alternative<GPUTickCommand>(next.data)) {
system.GPU().TickWork(); system.GPU().TickWork();
} else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) { } else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) {

Loading…
Cancel
Save