Add shader disk caching

This commit is contained in:
James Rowe 2019-09-07 16:11:09 -06:00
parent ce3f8bf94e
commit 4e9ec4efd0
17 changed files with 1097 additions and 62 deletions

View file

@ -4,6 +4,8 @@
#pragma once
#include <atomic>
#include <functional>
#include "common/common_types.h"
#include "core/hw/gpu.h"
@ -17,6 +19,14 @@ struct OutputVertex;
namespace VideoCore {
enum class LoadCallbackStage {
Prepare,
Decompile,
Build,
Complete,
};
using DiskResourceLoadCallback = std::function<void(LoadCallbackStage, std::size_t, std::size_t)>;
class RasterizerInterface {
public:
virtual ~RasterizerInterface() {}
@ -71,5 +81,8 @@ public:
virtual bool AccelerateDrawBatch(bool is_indexed) {
return false;
}
virtual void LoadDiskResources(const std::atomic_bool& stop_loading,
const DiskResourceLoadCallback& callback) {}
};
} // namespace VideoCore