diff options
| author | 2021-06-10 02:27:00 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:35 -0400 | |
| commit | 5befc0bf872058315c4f81bf58dcd173db2589fd (patch) | |
| tree | 046584e491c69195c504c7ed27a2a667580975fb /src | |
| parent | buffer_cache: Fix copy based uniform bindings tracking (diff) | |
| download | yuzu-5befc0bf872058315c4f81bf58dcd173db2589fd.tar.gz yuzu-5befc0bf872058315c4f81bf58dcd173db2589fd.tar.xz yuzu-5befc0bf872058315c4f81bf58dcd173db2589fd.zip | |
shader_environment: Fix local memory size calculations
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader_environment.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index a7a57a36f..6243cd176 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 + sph.common3.shader_local_memory_crs_size; | 72 | return local_memory_size; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | u32 GenericEnvironment::SharedMemorySize() const { | 75 | u32 GenericEnvironment::SharedMemorySize() const { |
| @@ -233,7 +233,7 @@ GraphicsEnvironment::GraphicsEnvironment(Tegra::Engines::Maxwell3D& maxwell3d_, | |||
| 233 | } | 233 | } |
| 234 | const u64 local_size{sph.LocalMemorySize()}; | 234 | const u64 local_size{sph.LocalMemorySize()}; |
| 235 | ASSERT(local_size <= std::numeric_limits<u32>::max()); | 235 | ASSERT(local_size <= std::numeric_limits<u32>::max()); |
| 236 | local_memory_size = static_cast<u32>(local_size); | 236 | local_memory_size = static_cast<u32>(local_size) + sph.common3.shader_local_memory_crs_size; |
| 237 | texture_bound = maxwell3d->regs.tex_cb_index; | 237 | texture_bound = maxwell3d->regs.tex_cb_index; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| @@ -261,7 +261,7 @@ ComputeEnvironment::ComputeEnvironment(Tegra::Engines::KeplerCompute& kepler_com | |||
| 261 | &kepler_compute_} { | 261 | &kepler_compute_} { |
| 262 | const auto& qmd{kepler_compute->launch_description}; | 262 | const auto& qmd{kepler_compute->launch_description}; |
| 263 | stage = Shader::Stage::Compute; | 263 | stage = Shader::Stage::Compute; |
| 264 | local_memory_size = qmd.local_pos_alloc; | 264 | local_memory_size = qmd.local_pos_alloc + qmd.local_crs_alloc; |
| 265 | texture_bound = kepler_compute->regs.tex_cb_index; | 265 | texture_bound = kepler_compute->regs.tex_cb_index; |
| 266 | shared_memory_size = qmd.shared_alloc; | 266 | shared_memory_size = qmd.shared_alloc; |
| 267 | workgroup_size = {qmd.block_dim_x, qmd.block_dim_y, qmd.block_dim_z}; | 267 | workgroup_size = {qmd.block_dim_x, qmd.block_dim_y, qmd.block_dim_z}; |