diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/core.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/sm/controller.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/sm/controller.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/sm/sm.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/sm/sm.h | 1 | ||||
-rw-r--r-- | src/video_core/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.cpp | 6 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.h | 12 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 | ||||
-rw-r--r-- | src/yuzu/bootmanager.cpp | 1 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 1 |
12 files changed, 25 insertions, 15 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index cbab80881..bf39ad689 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -24,7 +24,6 @@ #include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/thread.h" #include "core/hle/service/service.h" -#include "core/hle/service/sm/controller.h" #include "core/hle/service/sm/sm.h" #include "core/loader/loader.h" #include "core/perf_stats.h" diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index 1cef73216..cdf328a26 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -57,4 +57,6 @@ Controller::Controller() : ServiceFramework("IpcController") { RegisterHandlers(functions); } +Controller::~Controller() = default; + } // namespace Service::SM diff --git a/src/core/hle/service/sm/controller.h b/src/core/hle/service/sm/controller.h index a4de52cd2..dc66c9e37 100644 --- a/src/core/hle/service/sm/controller.h +++ b/src/core/hle/service/sm/controller.h @@ -11,7 +11,7 @@ namespace Service::SM { class Controller final : public ServiceFramework<Controller> { public: Controller(); - ~Controller() = default; + ~Controller() override; private: void ConvertSessionToDomain(Kernel::HLERequestContext& ctx); diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index b240d7eed..18d1641b8 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -15,6 +15,7 @@ namespace Service::SM { +ServiceManager::ServiceManager() = default; ServiceManager::~ServiceManager() = default; void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) { diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index e8ea62f08..a58d922a0 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -46,6 +46,7 @@ class ServiceManager { public: static void InstallInterfaces(std::shared_ptr<ServiceManager> self); + ServiceManager(); ~ServiceManager(); ResultVal<Kernel::SharedPtr<Kernel::ServerPort>> RegisterService(std::string name, diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 1982b76c4..65b5f57c3 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -23,6 +23,7 @@ add_library(video_core STATIC renderer_base.cpp renderer_base.h renderer_opengl/gl_buffer_cache.cpp + renderer_opengl/gl_buffer_cache.h renderer_opengl/gl_rasterizer.cpp renderer_opengl/gl_rasterizer.h renderer_opengl/gl_rasterizer_cache.cpp diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp index c85fbd306..0b5d18bcb 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp @@ -2,8 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <cstring> +#include <memory> + #include "common/alignment.h" -#include "common/assert.h" #include "core/core.h" #include "core/memory.h" #include "video_core/renderer_opengl/gl_buffer_cache.h" @@ -75,7 +77,7 @@ void OGLBufferCache::Unmap() { stream_buffer.Unmap(buffer_offset - buffer_offset_base); } -GLuint OGLBufferCache::GetHandle() { +GLuint OGLBufferCache::GetHandle() const { return stream_buffer.GetHandle(); } diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index 9c7ad27e6..6da862902 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -4,8 +4,8 @@ #pragma once +#include <cstddef> #include <memory> -#include <unordered_map> #include "common/common_types.h" #include "video_core/rasterizer_cache.h" @@ -31,7 +31,7 @@ struct CachedBufferEntry final { class OGLBufferCache final : public RasterizerCache<std::shared_ptr<CachedBufferEntry>> { public: - OGLBufferCache(size_t size); + explicit OGLBufferCache(size_t size); GLintptr UploadMemory(Tegra::GPUVAddr gpu_addr, size_t size, size_t alignment = 4, bool cache = true); @@ -41,7 +41,7 @@ public: void Map(size_t max_size); void Unmap(); - GLuint GetHandle(); + GLuint GetHandle() const; protected: void AlignBuffer(size_t alignment); @@ -49,9 +49,9 @@ protected: private: OGLStreamBuffer stream_buffer; - u8* buffer_ptr; - GLintptr buffer_offset; - GLintptr buffer_offset_base; + u8* buffer_ptr = nullptr; + GLintptr buffer_offset = 0; + GLintptr buffer_offset_base = 0; }; } // namespace OpenGL diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 5d493a2b2..6e89fa6e3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -237,6 +237,8 @@ void RasterizerOpenGL::SetupShaders() { } } + state.Apply(); + shader_program_manager->UseTrivialGeometryShader(); } @@ -666,8 +668,6 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, Shader& shad current_bindpoint + bindpoint); } - state.Apply(); - return current_bindpoint + static_cast<u32>(entries.size()); } @@ -714,8 +714,6 @@ u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, } } - state.Apply(); - return current_unit + static_cast<u32>(entries.size()); } diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 781ddb073..841647ebe 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2197,11 +2197,15 @@ private: case OpCode::Id::IPA: { const auto& attribute = instr.attribute.fmt28; const auto& reg = instr.gpr0; - ASSERT_MSG(instr.ipa.saturate == 0, "IPA saturate not implemented"); + Tegra::Shader::IpaMode input_mode{instr.ipa.interp_mode.Value(), instr.ipa.sample_mode.Value()}; regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index, input_mode); + + if (instr.ipa.saturate) { + regs.SetRegisterToFloat(reg, 0, regs.GetRegisterAsFloat(reg), 1, 1, true); + } break; } case OpCode::Id::SSY: { diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 159b2c32b..4a60f450a 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -256,6 +256,7 @@ void GRenderWindow::InitRenderTarget() { QGLFormat fmt; fmt.setVersion(3, 3); fmt.setProfile(QGLFormat::CoreProfile); + fmt.setSwapInterval(false); // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X fmt.setOption(QGL::NoDeprecatedFunctions); diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 351dd9225..e1f269d31 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -166,6 +166,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { OnResize(); OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); SDL_PumpEvents(); + SDL_GL_SetSwapInterval(false); LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc); |