chat: work around Direct3D 11 rendering artifacts on win11 arm (#3450)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel
2025-02-03 11:47:40 -05:00
committed by GitHub
parent c38c7455d8
commit 36c852b8be
5 changed files with 36 additions and 12 deletions

View File

@@ -0,0 +1,7 @@
#pragma once
#define APP_VERSION "@APP_VERSION@"
#define G4A_CONFIG(name) (1/G4A_CONFIG_##name == 1)
#define G4A_CONFIG_force_d3d12 @GPT4ALL_CONFIG_FORCE_D3D12@

View File

@@ -25,6 +25,10 @@
#include <QVariant>
#include <Qt>
#if G4A_CONFIG(force_d3d12)
# include <QSGRendererInterface>
#endif
#ifndef GPT4ALL_USE_QTPDF
# include <fpdfview.h>
#endif
@@ -83,6 +87,10 @@ int main(int argc, char *argv[])
return 0;
}
#if G4A_CONFIG(force_d3d12)
QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D12);
#endif
#ifdef Q_OS_LINUX
app.setWindowIcon(QIcon(":/gpt4all/icons/gpt4all.svg"));
#endif