diff options
Diffstat (limited to 'src/video_core/shader_cache.h')
| -rw-r--r-- | src/video_core/shader_cache.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h index f67cea8c4..a4391202d 100644 --- a/src/video_core/shader_cache.h +++ b/src/video_core/shader_cache.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <vector> | 12 | #include <vector> |
| 13 | 13 | ||
| 14 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 15 | #include "video_core/control/channel_state_cache.h" | ||
| 15 | #include "video_core/rasterizer_interface.h" | 16 | #include "video_core/rasterizer_interface.h" |
| 16 | #include "video_core/shader_environment.h" | 17 | #include "video_core/shader_environment.h" |
| 17 | 18 | ||
| @@ -19,6 +20,10 @@ namespace Tegra { | |||
| 19 | class MemoryManager; | 20 | class MemoryManager; |
| 20 | } | 21 | } |
| 21 | 22 | ||
| 23 | namespace Tegra::Control { | ||
| 24 | struct ChannelState; | ||
| 25 | } | ||
| 26 | |||
| 22 | namespace VideoCommon { | 27 | namespace VideoCommon { |
| 23 | 28 | ||
| 24 | class GenericEnvironment; | 29 | class GenericEnvironment; |
| @@ -28,7 +33,7 @@ struct ShaderInfo { | |||
| 28 | size_t size_bytes{}; | 33 | size_t size_bytes{}; |
| 29 | }; | 34 | }; |
| 30 | 35 | ||
| 31 | class ShaderCache { | 36 | class ShaderCache : public VideoCommon::ChannelSetupCaches<VideoCommon::ChannelInfo> { |
| 32 | static constexpr u64 YUZU_PAGEBITS = 14; | 37 | static constexpr u64 YUZU_PAGEBITS = 14; |
| 33 | static constexpr u64 YUZU_PAGESIZE = u64(1) << YUZU_PAGEBITS; | 38 | static constexpr u64 YUZU_PAGESIZE = u64(1) << YUZU_PAGEBITS; |
| 34 | 39 | ||
| @@ -71,9 +76,7 @@ protected: | |||
| 71 | } | 76 | } |
| 72 | }; | 77 | }; |
| 73 | 78 | ||
| 74 | explicit ShaderCache(VideoCore::RasterizerInterface& rasterizer_, | 79 | explicit ShaderCache(VideoCore::RasterizerInterface& rasterizer_); |
| 75 | Tegra::MemoryManager& gpu_memory_, Tegra::Engines::Maxwell3D& maxwell3d_, | ||
| 76 | Tegra::Engines::KeplerCompute& kepler_compute_); | ||
| 77 | 80 | ||
| 78 | /// @brief Update the hashes and information of shader stages | 81 | /// @brief Update the hashes and information of shader stages |
| 79 | /// @param unique_hashes Shader hashes to store into when a stage is enabled | 82 | /// @param unique_hashes Shader hashes to store into when a stage is enabled |
| @@ -88,10 +91,6 @@ protected: | |||
| 88 | void GetGraphicsEnvironments(GraphicsEnvironments& result, | 91 | void GetGraphicsEnvironments(GraphicsEnvironments& result, |
| 89 | const std::array<u64, NUM_PROGRAMS>& unique_hashes); | 92 | const std::array<u64, NUM_PROGRAMS>& unique_hashes); |
| 90 | 93 | ||
| 91 | Tegra::MemoryManager& gpu_memory; | ||
| 92 | Tegra::Engines::Maxwell3D& maxwell3d; | ||
| 93 | Tegra::Engines::KeplerCompute& kepler_compute; | ||
| 94 | |||
| 95 | std::array<const ShaderInfo*, NUM_PROGRAMS> shader_infos{}; | 94 | std::array<const ShaderInfo*, NUM_PROGRAMS> shader_infos{}; |
| 96 | bool last_shaders_valid = false; | 95 | bool last_shaders_valid = false; |
| 97 | 96 | ||