diff options
| author | 2021-06-09 23:33:48 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:35 -0400 | |
| commit | 15bdd27cac4a0b1e6cd168272dc337cd685ef144 (patch) | |
| tree | ae1d5c1a93bfc500e3603cb4fad8318676a13f1d | |
| parent | gl_texture_cache: Create image storage views (diff) | |
| download | yuzu-15bdd27cac4a0b1e6cd168272dc337cd685ef144.tar.gz yuzu-15bdd27cac4a0b1e6cd168272dc337cd685ef144.tar.xz yuzu-15bdd27cac4a0b1e6cd168272dc337cd685ef144.zip | |
shader_environment: Add shader_local_memory_crs_size to local memory size
Fixes DOOM 2016 missing local memory
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/program_header.h | 4 | ||||
| -rw-r--r-- | src/video_core/shader_environment.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/program_header.h b/src/shader_recompiler/program_header.h index 15f43f2d8..6933750aa 100644 --- a/src/shader_recompiler/program_header.h +++ b/src/shader_recompiler/program_header.h | |||
| @@ -230,8 +230,8 @@ struct ProgramHeader { | |||
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | [[nodiscard]] u64 LocalMemorySize() const noexcept { | 232 | [[nodiscard]] u64 LocalMemorySize() const noexcept { |
| 233 | return (common1.shader_local_memory_low_size | | 233 | return static_cast<u64>(common1.shader_local_memory_low_size) | |
| 234 | (common2.shader_local_memory_high_size << 24)); | 234 | (static_cast<u64>(common2.shader_local_memory_high_size) << 24); |
| 235 | } | 235 | } |
| 236 | }; | 236 | }; |
| 237 | static_assert(sizeof(ProgramHeader) == 0x50, "Incorrect structure size"); | 237 | static_assert(sizeof(ProgramHeader) == 0x50, "Incorrect structure size"); |
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index c93174519..a7a57a36f 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp | |||
| @@ -69,7 +69,7 @@ u32 GenericEnvironment::TextureBoundBuffer() const { | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | u32 GenericEnvironment::LocalMemorySize() const { | 71 | u32 GenericEnvironment::LocalMemorySize() const { |
| 72 | return local_memory_size; | 72 | return local_memory_size + sph.common3.shader_local_memory_crs_size; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | u32 GenericEnvironment::SharedMemorySize() const { | 75 | u32 GenericEnvironment::SharedMemorySize() const { |