diff options
| author | 2020-03-24 22:57:36 -0600 | |
|---|---|---|
| committer | 2020-03-25 23:32:42 -0600 | |
| commit | cf9c94d4017120b618194a720942ef4e5c8289bd (patch) | |
| tree | 30cbea0216626e3a1db1a68120b54e6bd53804f5 /src/video_core | |
| parent | Frontend/GPU: Refactor context management (diff) | |
| download | yuzu-cf9c94d4017120b618194a720942ef4e5c8289bd.tar.gz yuzu-cf9c94d4017120b618194a720942ef4e5c8289bd.tar.xz yuzu-cf9c94d4017120b618194a720942ef4e5c8289bd.zip | |
Address review and fix broken yuzu-tester build
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/video_core.cpp | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 8f59e0442..046ee55a5 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -305,6 +305,7 @@ void ShaderCacheOpenGL::LoadDiskCache(const std::atomic_bool& stop_loading, | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | const std::vector gl_cache = disk_cache.LoadPrecompiled(); | 307 | const std::vector gl_cache = disk_cache.LoadPrecompiled(); |
| 308 | const auto supported_formats = GetSupportedFormats(); | ||
| 308 | 309 | ||
| 309 | // Track if precompiled cache was altered during loading to know if we have to | 310 | // Track if precompiled cache was altered during loading to know if we have to |
| 310 | // serialize the virtual precompiled cache file back to the hard drive | 311 | // serialize the virtual precompiled cache file back to the hard drive |
| @@ -327,7 +328,6 @@ void ShaderCacheOpenGL::LoadDiskCache(const std::atomic_bool& stop_loading, | |||
| 327 | const auto worker = [&](Core::Frontend::GraphicsContext* context, std::size_t begin, | 328 | const auto worker = [&](Core::Frontend::GraphicsContext* context, std::size_t begin, |
| 328 | std::size_t end) { | 329 | std::size_t end) { |
| 329 | const auto scope = context->Acquire(); | 330 | const auto scope = context->Acquire(); |
| 330 | const auto supported_formats = GetSupportedFormats(); | ||
| 331 | 331 | ||
| 332 | for (std::size_t i = begin; i < end; ++i) { | 332 | for (std::size_t i = begin; i < end; ++i) { |
| 333 | if (stop_loading) { | 333 | if (stop_loading) { |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 6f08803c1..f1a28cc21 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -7,7 +7,9 @@ | |||
| 7 | #include <cstdlib> | 7 | #include <cstdlib> |
| 8 | #include <cstring> | 8 | #include <cstring> |
| 9 | #include <memory> | 9 | #include <memory> |
| 10 | |||
| 10 | #include <glad/glad.h> | 11 | #include <glad/glad.h> |
| 12 | |||
| 11 | #include "common/assert.h" | 13 | #include "common/assert.h" |
| 12 | #include "common/logging/log.h" | 14 | #include "common/logging/log.h" |
| 13 | #include "common/microprofile.h" | 15 | #include "common/microprofile.h" |
| @@ -313,8 +315,8 @@ public: | |||
| 313 | 315 | ||
| 314 | RendererOpenGL::RendererOpenGL(Core::Frontend::EmuWindow& emu_window, Core::System& system, | 316 | RendererOpenGL::RendererOpenGL(Core::Frontend::EmuWindow& emu_window, Core::System& system, |
| 315 | Core::Frontend::GraphicsContext& context) | 317 | Core::Frontend::GraphicsContext& context) |
| 316 | : VideoCore::RendererBase{emu_window}, emu_window{emu_window}, system{system}, frame_mailbox{}, | 318 | : VideoCore::RendererBase{emu_window}, emu_window{emu_window}, system{system}, |
| 317 | has_debug_tool{HasDebugTool()}, context{context} {} | 319 | frame_mailbox{}, context{context}, has_debug_tool{HasDebugTool()} {} |
| 318 | 320 | ||
| 319 | RendererOpenGL::~RendererOpenGL() = default; | 321 | RendererOpenGL::~RendererOpenGL() = default; |
| 320 | 322 | ||
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index fd9fec018..f60bdc60a 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -30,7 +30,7 @@ std::unique_ptr<VideoCore::RendererBase> CreateRenderer(Core::Frontend::EmuWindo | |||
| 30 | return nullptr; | 30 | return nullptr; |
| 31 | } | 31 | } |
| 32 | } | 32 | } |
| 33 | } // namespace | 33 | } // Anonymous namespace |
| 34 | 34 | ||
| 35 | namespace VideoCore { | 35 | namespace VideoCore { |
| 36 | 36 | ||
| @@ -39,7 +39,7 @@ std::unique_ptr<Tegra::GPU> CreateGPU(Core::Frontend::EmuWindow& emu_window, Cor | |||
| 39 | const auto scope = context->Acquire(); | 39 | const auto scope = context->Acquire(); |
| 40 | auto renderer = CreateRenderer(emu_window, system, *context); | 40 | auto renderer = CreateRenderer(emu_window, system, *context); |
| 41 | if (!renderer->Init()) { | 41 | if (!renderer->Init()) { |
| 42 | return {}; | 42 | return nullptr; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | if (Settings::values.use_asynchronous_gpu_emulation) { | 45 | if (Settings::values.use_asynchronous_gpu_emulation) { |