diff options
| author | 2019-02-09 19:19:16 -0400 | |
|---|---|---|
| committer | 2019-02-27 21:58:47 -0400 | |
| commit | e64fa4d2ea1519d325355711b5247cec6afd7d56 (patch) | |
| tree | 7c893fba2f715e490044451d28124194411b215f /src | |
| parent | Remove certain optimizations that caused texception to fail in certain scenar... (diff) | |
| download | yuzu-e64fa4d2ea1519d325355711b5247cec6afd7d56.tar.gz yuzu-e64fa4d2ea1519d325355711b5247cec6afd7d56.tar.xz yuzu-e64fa4d2ea1519d325355711b5247cec6afd7d56.zip | |
Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 21 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 4 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 09013d6da..58e6dc824 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -970,26 +970,17 @@ Surface RasterizerCacheOpenGL::GetColorBufferSurface(std::size_t index, bool pre | |||
| 970 | gpu.dirty_flags.color_buffer.reset(index); | 970 | gpu.dirty_flags.color_buffer.reset(index); |
| 971 | 971 | ||
| 972 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); | 972 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); |
| 973 | auto Notify = [&]() { | ||
| 974 | if (last_color_buffers[index] != current_color_buffers[index]) { | ||
| 975 | NotifyFrameBufferChange(current_color_buffers[index]); | ||
| 976 | } | ||
| 977 | last_color_buffers[index] = current_color_buffers[index]; | ||
| 978 | }; | ||
| 979 | 973 | ||
| 980 | if (index >= regs.rt_control.count) { | 974 | if (index >= regs.rt_control.count) { |
| 981 | Notify(); | ||
| 982 | return current_color_buffers[index] = {}; | 975 | return current_color_buffers[index] = {}; |
| 983 | } | 976 | } |
| 984 | 977 | ||
| 985 | if (regs.rt[index].Address() == 0 || regs.rt[index].format == Tegra::RenderTargetFormat::NONE) { | 978 | if (regs.rt[index].Address() == 0 || regs.rt[index].format == Tegra::RenderTargetFormat::NONE) { |
| 986 | Notify(); | ||
| 987 | return current_color_buffers[index] = {}; | 979 | return current_color_buffers[index] = {}; |
| 988 | } | 980 | } |
| 989 | 981 | ||
| 990 | const SurfaceParams color_params{SurfaceParams::CreateForFramebuffer(index)}; | 982 | const SurfaceParams color_params{SurfaceParams::CreateForFramebuffer(index)}; |
| 991 | 983 | ||
| 992 | Notify(); | ||
| 993 | return current_color_buffers[index] = GetSurface(color_params, preserve_contents); | 984 | return current_color_buffers[index] = GetSurface(color_params, preserve_contents); |
| 994 | } | 985 | } |
| 995 | 986 | ||
| @@ -1391,18 +1382,6 @@ bool RasterizerCacheOpenGL::PartialReinterpretSurface(Surface triggering_surface | |||
| 1391 | return true; | 1382 | return true; |
| 1392 | } | 1383 | } |
| 1393 | 1384 | ||
| 1394 | void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) { | ||
| 1395 | if (triggering_surface == nullptr) | ||
| 1396 | return; | ||
| 1397 | if (texception) { | ||
| 1398 | return; | ||
| 1399 | } | ||
| 1400 | Surface intersect = CollideOnReinterpretedSurface(triggering_surface->GetAddr()); | ||
| 1401 | if (intersect != nullptr) { | ||
| 1402 | PartialReinterpretSurface(triggering_surface, intersect); | ||
| 1403 | } | ||
| 1404 | } | ||
| 1405 | |||
| 1406 | void RasterizerCacheOpenGL::SignalPreDrawCall() { | 1385 | void RasterizerCacheOpenGL::SignalPreDrawCall() { |
| 1407 | if (texception) { | 1386 | if (texception) { |
| 1408 | glTextureBarrier(); | 1387 | glTextureBarrier(); |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index fd3f9cc72..bbad719b2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -488,9 +488,6 @@ private: | |||
| 488 | /// Tries to get a reserved surface for the specified parameters | 488 | /// Tries to get a reserved surface for the specified parameters |
| 489 | Surface TryGetReservedSurface(const SurfaceParams& params); | 489 | Surface TryGetReservedSurface(const SurfaceParams& params); |
| 490 | 490 | ||
| 491 | /// When a render target is changed, this method is called with the previous render target | ||
| 492 | void NotifyFrameBufferChange(Surface triggering_surface); | ||
| 493 | |||
| 494 | // Partialy reinterpret a surface based on a triggering_surface that collides with it. | 491 | // Partialy reinterpret a surface based on a triggering_surface that collides with it. |
| 495 | bool PartialReinterpretSurface(Surface triggering_surface, Surface intersect); | 492 | bool PartialReinterpretSurface(Surface triggering_surface, Surface intersect); |
| 496 | 493 | ||
| @@ -535,7 +532,6 @@ private: | |||
| 535 | auto interval = GetReinterpretInterval(r_surface); | 532 | auto interval = GetReinterpretInterval(r_surface); |
| 536 | reinterpreted_surfaces.insert({interval, r_surface}); | 533 | reinterpreted_surfaces.insert({interval, r_surface}); |
| 537 | r_surface->MarkReinterpreted(); | 534 | r_surface->MarkReinterpreted(); |
| 538 | run_texception_pass = true; | ||
| 539 | } | 535 | } |
| 540 | 536 | ||
| 541 | Surface CollideOnReinterpretedSurface(VAddr addr) const { | 537 | Surface CollideOnReinterpretedSurface(VAddr addr) const { |