diff options
| author | 2022-10-06 21:29:53 +0200 | |
|---|---|---|
| committer | 2022-10-06 21:29:53 +0200 | |
| commit | 1effa578f12f79d7816e3543291f302f126cc1d2 (patch) | |
| tree | 14803b31b6817294d40d57446f6fa94c5ff3fe9a /src/video_core/shader_cache.h | |
| parent | Merge pull request #9025 from FernandoS27/slava-ukrayini (diff) | |
| parent | vulkan_blitter: Fix pool allocation double free. (diff) | |
| download | yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.gz yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.xz yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.zip | |
Merge pull request #8467 from FernandoS27/yfc-rel-1
Project yuzu Fried Chicken (Y.F.C.) Part 1
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 | ||