VideoCore: implement channels on gpu caches.
This commit is contained in:
parent
c77b8df12e
commit
139ea93512
50 changed files with 1469 additions and 817 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "video_core/control/channel_state_cache.h"
|
||||
#include "video_core/rasterizer_interface.h"
|
||||
#include "video_core/shader_environment.h"
|
||||
|
||||
|
@ -19,6 +20,10 @@ namespace Tegra {
|
|||
class MemoryManager;
|
||||
}
|
||||
|
||||
namespace Tegra::Control {
|
||||
struct ChannelState;
|
||||
}
|
||||
|
||||
namespace VideoCommon {
|
||||
|
||||
class GenericEnvironment;
|
||||
|
@ -28,7 +33,7 @@ struct ShaderInfo {
|
|||
size_t size_bytes{};
|
||||
};
|
||||
|
||||
class ShaderCache {
|
||||
class ShaderCache : public VideoCommon::ChannelSetupCaches<VideoCommon::ChannelInfo> {
|
||||
static constexpr u64 YUZU_PAGEBITS = 14;
|
||||
static constexpr u64 YUZU_PAGESIZE = u64(1) << YUZU_PAGEBITS;
|
||||
|
||||
|
@ -71,9 +76,7 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
explicit ShaderCache(VideoCore::RasterizerInterface& rasterizer_,
|
||||
Tegra::MemoryManager& gpu_memory_, Tegra::Engines::Maxwell3D& maxwell3d_,
|
||||
Tegra::Engines::KeplerCompute& kepler_compute_);
|
||||
explicit ShaderCache(VideoCore::RasterizerInterface& rasterizer_);
|
||||
|
||||
/// @brief Update the hashes and information of shader stages
|
||||
/// @param unique_hashes Shader hashes to store into when a stage is enabled
|
||||
|
@ -88,10 +91,6 @@ protected:
|
|||
void GetGraphicsEnvironments(GraphicsEnvironments& result,
|
||||
const std::array<u64, NUM_PROGRAMS>& unique_hashes);
|
||||
|
||||
Tegra::MemoryManager& gpu_memory;
|
||||
Tegra::Engines::Maxwell3D& maxwell3d;
|
||||
Tegra::Engines::KeplerCompute& kepler_compute;
|
||||
|
||||
std::array<const ShaderInfo*, NUM_PROGRAMS> shader_infos{};
|
||||
bool last_shaders_valid = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue