mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-22 11:58:55 +00:00
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:
7
gpt4all-chat/src/config.h.in
Normal file
7
gpt4all-chat/src/config.h.in
Normal 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@
|
@@ -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
|
||||
|
Reference in New Issue
Block a user