mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-15 05:18:34 -05:00
Merge pull request #9344 from liamwhite/null
video_core: add null backend
This commit is contained in:
@ -237,8 +237,7 @@ private:
|
||||
GRenderWindow* render_window;
|
||||
};
|
||||
|
||||
class OpenGLRenderWidget : public RenderWidget {
|
||||
public:
|
||||
struct OpenGLRenderWidget : public RenderWidget {
|
||||
explicit OpenGLRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
|
||||
windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
|
||||
}
|
||||
@ -251,13 +250,16 @@ private:
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context;
|
||||
};
|
||||
|
||||
class VulkanRenderWidget : public RenderWidget {
|
||||
public:
|
||||
struct VulkanRenderWidget : public RenderWidget {
|
||||
explicit VulkanRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {
|
||||
windowHandle()->setSurfaceType(QWindow::VulkanSurface);
|
||||
}
|
||||
};
|
||||
|
||||
struct NullRenderWidget : public RenderWidget {
|
||||
explicit NullRenderWidget(GRenderWindow* parent) : RenderWidget(parent) {}
|
||||
};
|
||||
|
||||
static Core::Frontend::WindowSystemType GetWindowSystemType() {
|
||||
// Determine WSI type based on Qt platform.
|
||||
QString platform_name = QGuiApplication::platformName();
|
||||
@ -878,6 +880,9 @@ bool GRenderWindow::InitRenderTarget() {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Settings::RendererBackend::Null:
|
||||
InitializeNull();
|
||||
break;
|
||||
}
|
||||
|
||||
// Update the Window System information with the new render target
|
||||
@ -974,6 +979,11 @@ bool GRenderWindow::InitializeVulkan() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void GRenderWindow::InitializeNull() {
|
||||
child_widget = new NullRenderWidget(this);
|
||||
main_context = std::make_unique<DummyContext>();
|
||||
}
|
||||
|
||||
bool GRenderWindow::LoadOpenGL() {
|
||||
auto context = CreateSharedContext();
|
||||
auto scope = context->Acquire();
|
||||
|
Reference in New Issue
Block a user