diff options
| author | 2019-12-25 17:02:17 -0300 | |
|---|---|---|
| committer | 2020-02-28 16:39:27 -0300 | |
| commit | 96ac3d518a9882a2a040f319c47a567467c9266d (patch) | |
| tree | d1465f931df28d12891b07e5ab8c1d921a396376 /src/video_core/texture_cache | |
| parent | common/math_util: Support float type rectangles (diff) | |
| download | yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.gz yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.xz yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.zip | |
gl_rasterizer: Remove dirty flags
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c70e4aec2..ec6dfa49e 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -143,11 +143,6 @@ public: | |||
| 143 | std::lock_guard lock{mutex}; | 143 | std::lock_guard lock{mutex}; |
| 144 | auto& maxwell3d = system.GPU().Maxwell3D(); | 144 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 145 | 145 | ||
| 146 | if (!maxwell3d.dirty.depth_buffer) { | ||
| 147 | return depth_buffer.view; | ||
| 148 | } | ||
| 149 | maxwell3d.dirty.depth_buffer = false; | ||
| 150 | |||
| 151 | const auto& regs{maxwell3d.regs}; | 146 | const auto& regs{maxwell3d.regs}; |
| 152 | const auto gpu_addr{regs.zeta.Address()}; | 147 | const auto gpu_addr{regs.zeta.Address()}; |
| 153 | if (!gpu_addr || !regs.zeta_enable) { | 148 | if (!gpu_addr || !regs.zeta_enable) { |
| @@ -175,10 +170,6 @@ public: | |||
| 175 | std::lock_guard lock{mutex}; | 170 | std::lock_guard lock{mutex}; |
| 176 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); | 171 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); |
| 177 | auto& maxwell3d = system.GPU().Maxwell3D(); | 172 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 178 | if (!maxwell3d.dirty.render_target[index]) { | ||
| 179 | return render_targets[index].view; | ||
| 180 | } | ||
| 181 | maxwell3d.dirty.render_target[index] = false; | ||
| 182 | 173 | ||
| 183 | const auto& regs{maxwell3d.regs}; | 174 | const auto& regs{maxwell3d.regs}; |
| 184 | if (index >= regs.rt_control.count || regs.rt[index].Address() == 0 || | 175 | if (index >= regs.rt_control.count || regs.rt[index].Address() == 0 || |
| @@ -319,16 +310,7 @@ protected: | |||
| 319 | // and reading it from a separate buffer. | 310 | // and reading it from a separate buffer. |
| 320 | virtual void BufferCopy(TSurface& src_surface, TSurface& dst_surface) = 0; | 311 | virtual void BufferCopy(TSurface& src_surface, TSurface& dst_surface) = 0; |
| 321 | 312 | ||
| 322 | void ManageRenderTargetUnregister(TSurface& surface) { | 313 | void ManageRenderTargetUnregister([[maybe_unused]] TSurface& surface) {} |
| 323 | auto& maxwell3d = system.GPU().Maxwell3D(); | ||
| 324 | const u32 index = surface->GetRenderTarget(); | ||
| 325 | if (index == DEPTH_RT) { | ||
| 326 | maxwell3d.dirty.depth_buffer = true; | ||
| 327 | } else { | ||
| 328 | maxwell3d.dirty.render_target[index] = true; | ||
| 329 | } | ||
| 330 | maxwell3d.dirty.render_settings = true; | ||
| 331 | } | ||
| 332 | 314 | ||
| 333 | void Register(TSurface surface) { | 315 | void Register(TSurface surface) { |
| 334 | const GPUVAddr gpu_addr = surface->GetGpuAddr(); | 316 | const GPUVAddr gpu_addr = surface->GetGpuAddr(); |