Browse Source

Revert "[video_core, macro, scheduler] Following Lizzie's request of change"

pull/3322/head
CamilleLaVey 3 weeks ago
committed by crueter
parent
commit
c8be441281
  1. 16
      src/video_core/control/scheduler.cpp
  2. 2
      src/video_core/macro/macro.h

16
src/video_core/control/scheduler.cpp

@ -17,12 +17,16 @@ Scheduler::Scheduler(GPU& gpu_) : gpu{gpu_} {}
Scheduler::~Scheduler() = default;
void Scheduler::Push(s32 channel, CommandList&& entries) {
std::unique_lock lk(scheduling_guard);
auto it = channels.find(channel);
ASSERT(it != channels.end());
auto& channel_state = it->second;
gpu.BindChannel(channel_state->bind_id);
lk.unlock();
std::shared_ptr<ChannelState> channel_state;
{
std::unique_lock lk(scheduling_guard);
auto it = channels.find(channel);
ASSERT(it != channels.end());
channel_state = it->second;
gpu.BindChannel(channel_state->bind_id);
}
// Process commands outside the lock to reduce contention.
// Multiple channels can prepare their commands in parallel.
channel_state->dma_pusher->Push(std::move(entries));
channel_state->dma_pusher->DispatchCalls();
}

2
src/video_core/macro/macro.h

@ -142,8 +142,8 @@ private:
std::unique_ptr<HLEMacro> hle_macros;
Engines::Maxwell3D& maxwell3d;
CacheInfo* last_macro_cache{nullptr};
u32 last_macro_method{0xFFFFFFFF};
CacheInfo* last_macro_cache{nullptr};
};
std::unique_ptr<MacroEngine> GetMacroEngine(Engines::Maxwell3D& maxwell3d);

Loading…
Cancel
Save