diff options
| author | 2023-05-02 23:52:21 +0100 | |
|---|---|---|
| committer | 2023-05-02 23:52:21 +0100 | |
| commit | f902cc2a2b5875eb20a403390ed849af68e094f0 (patch) | |
| tree | 69f21919b2bf649e23eee3ce154f214f8f3945c8 /src/video_core/shader_cache.cpp | |
| parent | Merge pull request #10133 from lat9nq/clang-shadow-and-fallthrough (diff) | |
| download | yuzu-f902cc2a2b5875eb20a403390ed849af68e094f0.tar.gz yuzu-f902cc2a2b5875eb20a403390ed849af68e094f0.tar.xz yuzu-f902cc2a2b5875eb20a403390ed849af68e094f0.zip | |
Fix code resize to use word size rather than byte size
Diffstat (limited to 'src/video_core/shader_cache.cpp')
| -rw-r--r-- | src/video_core/shader_cache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index d9482371b..c5213875b 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp | |||
| @@ -228,14 +228,14 @@ const ShaderInfo* ShaderCache::MakeShaderInfo(GenericEnvironment& env, VAddr cpu | |||
| 228 | auto info = std::make_unique<ShaderInfo>(); | 228 | auto info = std::make_unique<ShaderInfo>(); |
| 229 | if (const std::optional<u64> cached_hash{env.Analyze()}) { | 229 | if (const std::optional<u64> cached_hash{env.Analyze()}) { |
| 230 | info->unique_hash = *cached_hash; | 230 | info->unique_hash = *cached_hash; |
| 231 | info->size_bytes = env.CachedSize(); | 231 | info->size_bytes = env.CachedSizeBytes(); |
| 232 | } else { | 232 | } else { |
| 233 | // Slow path, not really hit on commercial games | 233 | // Slow path, not really hit on commercial games |
| 234 | // Build a control flow graph to get the real shader size | 234 | // Build a control flow graph to get the real shader size |
| 235 | Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block; | 235 | Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block; |
| 236 | Shader::Maxwell::Flow::CFG cfg{env, flow_block, env.StartAddress()}; | 236 | Shader::Maxwell::Flow::CFG cfg{env, flow_block, env.StartAddress()}; |
| 237 | info->unique_hash = env.CalculateHash(); | 237 | info->unique_hash = env.CalculateHash(); |
| 238 | info->size_bytes = env.ReadSize(); | 238 | info->size_bytes = env.ReadSizeBytes(); |
| 239 | } | 239 | } |
| 240 | const size_t size_bytes{info->size_bytes}; | 240 | const size_t size_bytes{info->size_bytes}; |
| 241 | const ShaderInfo* const result{info.get()}; | 241 | const ShaderInfo* const result{info.get()}; |