From 74b82bab3b6e4e8a1799bbcbdc5244f20f4d2826 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 3 Oct 2018 22:28:38 +1000 Subject: GLInterface: Drop Haiku support --- Source/Core/VideoCommon/DriverDetails.cpp | 2 -- Source/Core/VideoCommon/DriverDetails.h | 1 - 2 files changed, 3 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 301c73d89f..fd52d3dd6b 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -35,8 +35,6 @@ const u32 m_os = OS_ALL | OS_LINUX; const u32 m_os = OS_ALL | OS_FREEBSD; #elif __OpenBSD__ const u32 m_os = OS_ALL | OS_OPENBSD; -#elif __HAIKU__ -const u32 m_os = OS_ALL | OS_HAIKU; #endif static API m_api = API_OPENGL; diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h index 9ace5f83b4..7d60b0e168 100644 --- a/Source/Core/VideoCommon/DriverDetails.h +++ b/Source/Core/VideoCommon/DriverDetails.h @@ -27,7 +27,6 @@ enum OS OS_ANDROID = (1 << 4), OS_FREEBSD = (1 << 5), OS_OPENBSD = (1 << 6), - OS_HAIKU = (1 << 7), }; // Enum of known vendors // Tegra and Nvidia are separated out due to such substantial differences -- cgit v1.2.3 From a3961750a7174be7402fc492367f017d845b8e1f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 3 Oct 2018 23:03:13 +1000 Subject: Drop Host_GetRenderSurface and pass display to backend --- Source/Core/VideoCommon/RenderBase.cpp | 3 +-- Source/Core/VideoCommon/RenderBase.h | 4 ++-- Source/Core/VideoCommon/VideoBackendBase.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 317f876aa7..3c7eec10f1 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -86,7 +86,6 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height) if (SConfig::GetInstance().bWii) m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN); - m_surface_handle = Host_GetRenderHandle(); m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits; m_last_efb_multisamples = g_ActiveConfig.iMultisamples; } @@ -408,7 +407,7 @@ float Renderer::CalculateDrawAspectRatio() const bool Renderer::IsHeadless() const { - return !m_surface_handle; + return true; } void Renderer::ChangeSurface(void* new_surface_handle) diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h index e5861d00c9..07f7ea7bae 100644 --- a/Source/Core/VideoCommon/RenderBase.h +++ b/Source/Core/VideoCommon/RenderBase.h @@ -77,6 +77,8 @@ public: using ClearColor = std::array; + virtual bool IsHeadless() const = 0; + virtual void SetPipeline(const AbstractPipeline* pipeline) {} virtual void SetScissorRect(const MathUtil::Rectangle& rc) {} virtual void SetTexture(u32 index, const AbstractTexture* texture) {} @@ -134,7 +136,6 @@ public: const TargetRectangle& GetTargetRectangle() const { return m_target_rectangle; } float CalculateDrawAspectRatio() const; - bool IsHeadless() const; std::tuple ScaleToDisplayAspectRatio(int width, int height) const; void UpdateDrawRectangle(); @@ -236,7 +237,6 @@ protected: std::unique_ptr m_post_processor; - void* m_surface_handle = nullptr; void* m_new_surface_handle = nullptr; Common::Flag m_surface_changed; Common::Flag m_surface_resized; diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h index 5f43b904d4..3b106bff98 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.h +++ b/Source/Core/VideoCommon/VideoBackendBase.h @@ -35,7 +35,7 @@ class VideoBackendBase { public: virtual ~VideoBackendBase() {} - virtual bool Initialize(void* window_handle) = 0; + virtual bool Initialize(void* display_handle, void* window_handle) = 0; virtual void Shutdown() = 0; virtual std::string GetName() const = 0; -- cgit v1.2.3 From 1d827a52234974f308e71e86cdd6f61293e0523f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 3 Oct 2018 23:03:16 +1000 Subject: Renderer: Pull dimensions from GLInterface/Swapchain --- Source/Core/VideoCommon/RenderBase.cpp | 4 +--- Source/Core/VideoCommon/RenderBase.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 3c7eec10f1..5aa6989615 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -417,11 +417,9 @@ void Renderer::ChangeSurface(void* new_surface_handle) m_surface_changed.Set(); } -void Renderer::ResizeSurface(int new_width, int new_height) +void Renderer::ResizeSurface() { std::lock_guard lock(m_swap_mutex); - m_new_backbuffer_width = new_width; - m_new_backbuffer_height = new_height; m_surface_resized.Set(); } diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h index 07f7ea7bae..d5dd761c40 100644 --- a/Source/Core/VideoCommon/RenderBase.h +++ b/Source/Core/VideoCommon/RenderBase.h @@ -183,7 +183,7 @@ public: // Final surface changing // This is called when the surface is resized (WX) or the window changes (Android). void ChangeSurface(void* new_surface_handle); - void ResizeSurface(int new_width, int new_height); + void ResizeSurface(); bool UseVertexDepthRange() const; virtual std::unique_ptr CreateAsyncShaderCompiler(); @@ -229,8 +229,6 @@ protected: // Backbuffer (window) size and render area int m_backbuffer_width = 0; int m_backbuffer_height = 0; - int m_new_backbuffer_width = 0; - int m_new_backbuffer_height = 0; TargetRectangle m_target_rectangle = {}; FPSCounter m_fps_counter; -- cgit v1.2.3 From eb284b5d661cab6aed770e0e51b790917249ef21 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 3 Oct 2018 23:03:22 +1000 Subject: VideoBackends: Pass window system info from host on creation --- Source/Core/VideoCommon/VideoBackendBase.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h index 3b106bff98..83a74b0608 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.h +++ b/Source/Core/VideoCommon/VideoBackendBase.h @@ -9,6 +9,7 @@ #include #include "Common/CommonTypes.h" +#include "Common/WindowSystemInfo.h" #include "VideoCommon/PerfQueryBase.h" namespace MMIO @@ -35,7 +36,7 @@ class VideoBackendBase { public: virtual ~VideoBackendBase() {} - virtual bool Initialize(void* display_handle, void* window_handle) = 0; + virtual bool Initialize(const WindowSystemInfo& wsi) = 0; virtual void Shutdown() = 0; virtual std::string GetName() const = 0; -- cgit v1.2.3