shader: Adhere to disk shader cache setting
This commit is contained in:
parent
b659212dbd
commit
dd39b87b0c
|
@ -64,12 +64,13 @@ void EmuThread::run() {
|
||||||
|
|
||||||
emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
||||||
|
|
||||||
system.Renderer().ReadRasterizer()->LoadDiskResources(
|
if (Settings::values.use_disk_shader_cache.GetValue()) {
|
||||||
system.CurrentProcess()->GetTitleID(), stop_token,
|
system.Renderer().ReadRasterizer()->LoadDiskResources(
|
||||||
[this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {
|
system.CurrentProcess()->GetTitleID(), stop_token,
|
||||||
emit LoadProgress(stage, value, total);
|
[this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {
|
||||||
});
|
emit LoadProgress(stage, value, total);
|
||||||
|
});
|
||||||
|
}
|
||||||
emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
|
emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
|
||||||
|
|
||||||
gpu.ReleaseContext();
|
gpu.ReleaseContext();
|
||||||
|
|
|
@ -218,9 +218,11 @@ int main(int argc, char** argv) {
|
||||||
// Core is loaded, start the GPU (makes the GPU contexts current to this thread)
|
// Core is loaded, start the GPU (makes the GPU contexts current to this thread)
|
||||||
system.GPU().Start();
|
system.GPU().Start();
|
||||||
|
|
||||||
system.Renderer().ReadRasterizer()->LoadDiskResources(
|
if (Settings::values.use_disk_shader_cache.GetValue()) {
|
||||||
system.CurrentProcess()->GetTitleID(), std::stop_token{},
|
system.Renderer().ReadRasterizer()->LoadDiskResources(
|
||||||
[](VideoCore::LoadCallbackStage, size_t value, size_t total) {});
|
system.CurrentProcess()->GetTitleID(), std::stop_token{},
|
||||||
|
[](VideoCore::LoadCallbackStage, size_t value, size_t total) {});
|
||||||
|
}
|
||||||
|
|
||||||
void(system.Run());
|
void(system.Run());
|
||||||
while (emu_window->IsOpen()) {
|
while (emu_window->IsOpen()) {
|
||||||
|
|
Reference in New Issue