OpenMiInk/third_party/krita-deps-management/ext_googleangle/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch
Hellings b8c8ff98e2 Hi
2026-10-16 09:05:56 -04:00

41 lines
1.6 KiB
Diff

From e09677662ee7e75a2ce0dd6f0716d9a03fd225e2 Mon Sep 17 00:00:00 2001
From: Andre de la Rocha <andre.rocha@qt.io>
Date: Tue, 11 Sep 2018 12:57:23 +0200
Subject: [PATCH 08/17] ANGLE: Disable multisampling to avoid crash in Qt
applications
This patch adds a workaround for the crash that occurs with multisampling
enabled in some Qt applications (e.g., the 2dpainting example). The old
Angle release we were using lacked support for multisampling, so it was
ignored when requested. This current version seems to support it, but is
causing a crash in the D3D11 shaders, so this workaround disables that
support.
---
src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index 74110f04c..e89719966 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -1121,6 +1121,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
{
gl::SupportedSampleSet sampleCounts;
+#if 0 // Qt: Disabling support for multisampling as it is causing a crash in the D3D11 shaders.
+
// Generate a new set from the set intersection of sample counts between the color and depth
// format caps.
std::set_intersection(colorBufferFormatCaps.sampleCounts.begin(),
@@ -1141,6 +1143,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
sampleCounts = depthStencilBufferFormatCaps.sampleCounts;
}
+#endif
+
// Always support 0 samples
sampleCounts.insert(0);
--
2.24.1.windows.2