diff options
| author | 2019-02-09 18:42:52 -0400 | |
|---|---|---|
| committer | 2019-02-27 21:58:45 -0400 | |
| commit | 3558c88442b532642ce077d32bf1ddfdd36bd0c3 (patch) | |
| tree | d4bc6e3b2303d1d8f28ce96044dc0139332614ec /src | |
| parent | Bug fixes and formatting (diff) | |
| download | yuzu-3558c88442b532642ce077d32bf1ddfdd36bd0c3.tar.gz yuzu-3558c88442b532642ce077d32bf1ddfdd36bd0c3.tar.xz yuzu-3558c88442b532642ce077d32bf1ddfdd36bd0c3.zip | |
Remove certain optimizations that caused texception to fail in certain scenarios.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 19 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 3 |
3 files changed, 1 insertions, 24 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 1a0a18c3e..99c3cd67d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -575,8 +575,6 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers( | |||
| 575 | SetupCachedFramebuffer(fbkey, current_state); | 575 | SetupCachedFramebuffer(fbkey, current_state); |
| 576 | SyncViewport(current_state); | 576 | SyncViewport(current_state); |
| 577 | 577 | ||
| 578 | res_cache.SignalPostFramebufferSetup(); | ||
| 579 | |||
| 580 | return current_depth_stencil_usage = {static_cast<bool>(depth_surface), fbkey.stencil_enable}; | 578 | return current_depth_stencil_usage = {static_cast<bool>(depth_surface), fbkey.stencil_enable}; |
| 581 | } | 579 | } |
| 582 | 580 | ||
| @@ -1019,7 +1017,6 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s | |||
| 1019 | texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc); | 1017 | texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc); |
| 1020 | 1018 | ||
| 1021 | Surface surface = res_cache.GetTextureSurface(texture, entry); | 1019 | Surface surface = res_cache.GetTextureSurface(texture, entry); |
| 1022 | res_cache.SignalSurfaceParameter(surface); | ||
| 1023 | if (surface != nullptr) { | 1020 | if (surface != nullptr) { |
| 1024 | state.texture_units[current_bindpoint].texture = | 1021 | state.texture_units[current_bindpoint].texture = |
| 1025 | entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle; | 1022 | entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 66a80730c..09013d6da 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -1394,7 +1394,6 @@ bool RasterizerCacheOpenGL::PartialReinterpretSurface(Surface triggering_surface | |||
| 1394 | void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) { | 1394 | void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) { |
| 1395 | if (triggering_surface == nullptr) | 1395 | if (triggering_surface == nullptr) |
| 1396 | return; | 1396 | return; |
| 1397 | run_texception_pass = false; | ||
| 1398 | if (texception) { | 1397 | if (texception) { |
| 1399 | return; | 1398 | return; |
| 1400 | } | 1399 | } |
| @@ -1408,11 +1407,10 @@ void RasterizerCacheOpenGL::SignalPreDrawCall() { | |||
| 1408 | if (texception) { | 1407 | if (texception) { |
| 1409 | glTextureBarrier(); | 1408 | glTextureBarrier(); |
| 1410 | } | 1409 | } |
| 1410 | texception = false; | ||
| 1411 | } | 1411 | } |
| 1412 | 1412 | ||
| 1413 | void RasterizerCacheOpenGL::SignalPostDrawCall() { | 1413 | void RasterizerCacheOpenGL::SignalPostDrawCall() { |
| 1414 | if (!run_texception_pass) | ||
| 1415 | return; | ||
| 1416 | for (u32 i = 0; i < Maxwell::NumRenderTargets; i++) { | 1414 | for (u32 i = 0; i < Maxwell::NumRenderTargets; i++) { |
| 1417 | if (current_color_buffers[i] != nullptr) { | 1415 | if (current_color_buffers[i] != nullptr) { |
| 1418 | Surface intersect = CollideOnReinterpretedSurface(current_color_buffers[i]->GetAddr()); | 1416 | Surface intersect = CollideOnReinterpretedSurface(current_color_buffers[i]->GetAddr()); |
| @@ -1422,21 +1420,6 @@ void RasterizerCacheOpenGL::SignalPostDrawCall() { | |||
| 1422 | } | 1420 | } |
| 1423 | } | 1421 | } |
| 1424 | } | 1422 | } |
| 1425 | if (!texception) | ||
| 1426 | run_texception_pass = false; | ||
| 1427 | } | ||
| 1428 | |||
| 1429 | void RasterizerCacheOpenGL::SignalPostFramebufferSetup() { | ||
| 1430 | if (!run_texception_pass) | ||
| 1431 | texception = false; | ||
| 1432 | } | ||
| 1433 | |||
| 1434 | void RasterizerCacheOpenGL::SignalSurfaceParameter(Surface& surface) { | ||
| 1435 | if (surface == nullptr) | ||
| 1436 | return; | ||
| 1437 | if (surface->IsReinterpreted()) { | ||
| 1438 | run_texception_pass = true; | ||
| 1439 | } | ||
| 1440 | } | 1423 | } |
| 1441 | 1424 | ||
| 1442 | } // namespace OpenGL | 1425 | } // namespace OpenGL |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 67841d554..fd3f9cc72 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -471,8 +471,6 @@ public: | |||
| 471 | 471 | ||
| 472 | void SignalPreDrawCall(); | 472 | void SignalPreDrawCall(); |
| 473 | void SignalPostDrawCall(); | 473 | void SignalPostDrawCall(); |
| 474 | void SignalSurfaceParameter(Surface& surface); | ||
| 475 | void SignalPostFramebufferSetup(); | ||
| 476 | 474 | ||
| 477 | private: | 475 | private: |
| 478 | void LoadSurface(const Surface& surface); | 476 | void LoadSurface(const Surface& surface); |
| @@ -512,7 +510,6 @@ private: | |||
| 512 | OGLFramebuffer read_framebuffer; | 510 | OGLFramebuffer read_framebuffer; |
| 513 | OGLFramebuffer draw_framebuffer; | 511 | OGLFramebuffer draw_framebuffer; |
| 514 | 512 | ||
| 515 | bool run_texception_pass = false; | ||
| 516 | bool texception = false; | 513 | bool texception = false; |
| 517 | 514 | ||
| 518 | /// Use a Pixel Buffer Object to download the previous texture and then upload it to the new one | 515 | /// Use a Pixel Buffer Object to download the previous texture and then upload it to the new one |