VERY experimental Nintendo Switch 2 emulator
C++
shader_environment: Add shader_local_memory_crs_size to local memory size
ameerj1bbecac1d2bc
diff --git a/src/shader_recompiler/program_header.h b/src/shader_recompiler/program_header.hindex 15f43f2d8e..6933750aae 100644--- a/src/shader_recompiler/program_header.h+++ b/src/shader_recompiler/program_header.h@@ -230,8 +230,8 @@ struct ProgramHeader {};[[nodiscard]] u64 LocalMemorySize() const noexcept {- return (common1.shader_local_memory_low_size |- (common2.shader_local_memory_high_size << 24));+ return static_cast<u64>(common1.shader_local_memory_low_size) |+ (static_cast<u64>(common2.shader_local_memory_high_size) << 24);}};static_assert(sizeof(ProgramHeader) == 0x50, "Incorrect structure size");diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cppindex c93174519d..a7a57a36fb 100644--- a/src/video_core/shader_environment.cpp+++ b/src/video_core/shader_environment.cpp@@ -69,7 +69,7 @@ u32 GenericEnvironment::TextureBoundBuffer() const {}u32 GenericEnvironment::LocalMemorySize() const {- return local_memory_size;+ return local_memory_size + sph.common3.shader_local_memory_crs_size;}u32 GenericEnvironment::SharedMemorySize() const {