[quick feed needed] Does Krita need openGL rendering backend on Windows?

Hi, all!

I am currently working on porting Krita to Qt6 and I have a question for you, painters. Does anyone really need openGL GPU acceleration backend on Windows?

Or anyone is okay with “Direct3D 11 via ANGLE” rendering backend? Have you ever had situation when you had to switch back to openGL backend to fix some rendering issue?

PS:
The answer to the question strongly depend on the GPUs people use and the dirvers they have. So I need as much broad feedback as possible… If we drop direct openGL support on Windows, then it would be harder to do quick workarounds for bugs in GPU drivers.

3 Likes

With my AMD GPU OpenGL feels a lot smoother when using huge brushes than Direct3D, if I use NVIDIA instead Direct3D feels far better.
And because my current AMD GPU has the better performance, it is the one I have in my PC. So I can work with both options, since both GPUs will work with both options, but currently it would be a loss for me.
Also, there were occasionally users with AMD GPUs who said that OpenGL is the better option for them, for the same reason, it feels smoother.

But one thing I am struggling with right now, I cannot remember for sure if there were users who could only use OpenGL for some reason, but something in the back of my head tells me that we had very few such support requests where the use of OpenGL was the solution to their problems and made Krita usable for them.

Michelist

I mean, isn’t changing to OpenGL the answer for optimization on slight older hardware? Dropping that wouldn’t affect those?

With my AMD GPU OpenGL feels a lot smoother when using huge brushes than Direct3D

Hm… if I make you a testing build that runs ANGLE with openGL backend, will you be able to test and compare the speed difference?

That depends on the required technical understanding of the matter. So far I’ve always judged it by the responsiveness of very large brush diameters, and OpenGL felt more responsive to me. If you tell me what I should try out, what I should do, then I can tell you whether I’m confident about it.

I’m asking, because somehow your question sounds like I need a certain amount of technical understanding. Although I’m obviously not completely stupid, as long as I’ve been providing support here and haven’t yet been stoned for it. :wink:

Michelist

1 Like

I’m asking, because somehow your question sounds like I need a certain amount of technical understanding

No, you’ll just have to run Krita with a specific environment variable set (using terminal). Though the build will definitely not be ready today :slight_smile:

1 Like

My feedback is the same as Michelist’s. I always use Krita in OpenGL mode (on Windows), as that’s performing better that ANGLE+DX11.

I would be interested in trying out ANGLE+OpenGL as well.

From the point of view of simplifying the Qt6 implementation, it would be nice to standardize on ANGLE, but provide multiple backends, e.g. DX11, OpenGL, Vulkan, and Metal, so that people could pick the best performing one for their GPU.

1 Like

Okay, then I will test it.

Michelist

Win 10 / 11 with Nvidia RTX here.

OpenGL is working better than Direct3D 11 via ANGLE for me.
Especially if brushes with layers and filter masks are used.
Direct3D 11 via ANGLE tends to introduce stuttering brush strokes.

See also this krita bug from last year’s bug hunt month:
https://bugs.kde.org/show_bug.cgi?id=477753

On my system it only happens with Direct3D.

So please do not abandon OpenGL if Direct3D 11 via Angle stays the way it is today.

2 Likes

I’m using an Intel CPU, and the optimization of OpenGL on my device is better than that of ANGLE.

Hi, @cgidesign, @Michelist and @YRH!

Could you please test this package?

It activates openGL backend in Angle, so I wonder if there will be any benefits and it would be better performance-wise?

Test plan:

  1. Open your normal Krita (not from this package)
  2. Switch to “DirectX via ANGLE” mode in the settings dialog
  3. Close your normal Krita
  4. Open Krita from the package
  5. Go to “Help->System information for bugreports”
  6. Check that your renderer string has “OpenGL” words in it:
    Vendor: “Google Inc. (Intel)”
    Renderer: “ANGLE (Intel, Intel(R) Iris(R) Plus Graphics, OpenGL 4.5.0 - Build 31.0.101.1999)”
  7. Create a document and paint as usual.
    WARNING: in this build the canvas is offset by a dozen of pixels to the top, it is a known issue of the test build and shouldn’t affect the performance.
  8. Does painting look more responsive than normal Krita with DirectX backend? Does it as performant as raw-openGL mode in normal Krita build?

PS:
Don’t try to activate raw-openGL mode in this build, it will flip the window vertically :slight_smile:

2 Likes

Is this limited to intel GPU?

I tried to run it:
Windows 10
Nvidia Geforce GTX 960M
Intel Core i7-6700HQ

But it does not start:

Error occurred on Friday, March 7, 2025 at 16:49:11.

krita.exe caused an Access Violation at location 00007FF9106EB55E in module libkritaflake.dll Reading from location 0000000000000000.

It is an old GPU but supports OpenGL 4.5

Specs:

DirectX: 12 (11_0)
OpenGL: 4.6
OpenCL: 3.0
Vulkan: 1.3
CUDA: 5.0
Shader Model: 6.7 (5.1)

1 Like

For me it’s a bit different but it’s also crashing. I didn’t get the crash log, but hooking up the debugger showed this:

QWindowsOpenGLTester::requestedGlesRenderer(): requested renderer "opengl"
Preferred type: QFlags(0x80)
No "haiku" available.
No "macintosh" available.
No "breeze" available.
Set style "fusion"
ERROR 0x3004 command eglCreateWindowSurface message EGL_ANGLE_surface_orientation is not enabled.
createWindowSurface: Could not create the EGL window surface: 0x3004
Exception thrown at 0x00007FFE5D9B6FDB (libkritaui.dll) in krita.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

I omitted some lines for brevity.

EDIT: If I run with Canvas Acceleration OFF, I do get a similar crash as cgidesign:

Error occurred on Friday, March 7, 2025 at 17:34:30.

krita.exe caused an Access Violation at location 00007FFE5BBCB55E in module libkritaflake.dll Reading from location 0000000000000000.

AddrPC           Params
00007FFE5BBCB55E 00000014244FE2C0 00007FFE86E12798 0000000000000010  libkritaflake.dll!KoFontRegistry::fontMetricsForCSSValues+0x56e
00007FFE5BB54398 000000F500000000 00000131FFFFFF5F FFFFFFBC00000304  libkritaflake.dll!KoSvgTextProperties::xHeight+0x108
00007FFE5BB53D6B 00007FFEE04498B0 00007FFEE0320139 0000016968F84D60  libkritaflake.dll!KoSvgTextProperties::resolveRelativeValues+0x9b
00007FFE5BB53C99 0000016968CFCB60 00000014244FE7A0 0000000000000000  libkritaflake.dll!KoSvgTextProperties::inheritFrom+0x1c9
00007FFE5BB865D5 0000000000000000 00000014244FED98 00000014244FEDA8  libkritaflake.dll!KoSvgTextShape::Private::relayout+0x225
00007FFE5BA43E6E 0000000000000006 00007FFE5BEBCBF3 0000016968F84970  libkritaflake.dll!KoShape::shapeChangedPriv+0x3e
00007FFE5BCC054C 0000000000000002 0000000000000004 0000000000000018  libkritaflake.dll!generateImage+0x27c
00007FFE5BCC4162 00000169690CAD80 00007FFE5BCC8587 00000169690CB140  libkritaflake.dll!KoFontFamily::updateThumbnail+0xa22
00007FFE5BCC8606 0000000000000000 00018E98F7B0AF8F 0000016965279CE0  libkritaflake.dll!FontIterator::resourceImpl+0x16
00007FFE884D5B3A 0000000000000018 00000169690CAD00 00000014244FF120  libkritaresources.dll!KisResourceStorage::ResourceIterator::resource+0x7a
00007FFE884D6241 00007FFE5C2FC790 00018E98F7DCEF8F 0000016968652800  libkritaresources.dll!KisResourceStorage::ResourceIterator::versions() const::DumbIterator::resourceImpl+0x11
00007FFE884D5B3A 0000000000000000 0000000000000000 0000000000000000  libkritaresources.dll!KisResourceStorage::ResourceIterator::resource+0x7a
00007FFE884A521B 0000016965276E20 0000000000000000 0000000000000000  libkritaresources.dll!KisResourceCacheDb::addResources+0x13b
00007FFE884AD0A6 0000000000000000 0000000000000000 0000000000000000  libkritaresources.dll!KisResourceCacheDb::addStorage+0x14b6
00007FFE884AFAB2 0000016951640000 0000001400000000 0000016964B3F3E0  libkritaresources.dll!KisResourceCacheDb::synchronizeStorage+0x972
00007FFE884BDFCC 0000000000000028 00007FFE00000000 00007FFE5C2FC450  libkritaresources.dll!KisResourceLocator::synchronizeDb+0x28c
00007FFE884BC472 0000000000000000 0000001400000000 0000016951665900  libkritaresources.dll!KisResourceLocator::initialize+0x512
00007FFE5DC6AE5F 0000000000000000 0000000000000000 0000000000000000  libkritaui.dll!KisApplication::registerResources+0x21bf
00007FFE5DC6C09F 00000014244FFC58 00007FFE00000000 00007FF7367B0000  libkritaui.dll!KisApplication::start+0x5ff
00007FFE5E0D568E 000000000000003C 00007FF7367B6100 00007FF7367B60F8  krita.dll!krita_main+0x423e
00007FF7367B1311 0000000000000000 0000000000000000 0000000000000000  krita.exe!__tmainCRTStartup+0x1b1
00007FF7367B1156 0000000000000000 0000000000000000 0000000000000000  krita.exe!WinMainCRTStartup+0x16
00007FFEE15FE8D7 0000000000000000 0000000000000000 000004F0FFFFFB30  KERNEL32.DLL!BaseThreadInitThunk+0x17
00007FFEE2ADBF2C 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x2c

@YRH
that’s interesting - acceleration is actually active in my Krita settings.

I’m on an AMD driver here, so it could be a factor.

Comparison of GL vs. DirectX via Angle in the normal Krita 5.3 (not the new test package).

DirectX via Angle:

GL:

I drew on my old notebook with the touchpad, so the paint strokes differ a bit. Interesting is that not only the painting is faster with GL but the Undo as well.

1 Like

:open_mouth: That’s craaazy! My guess is that ANGLE has more overhead uploading image tiles to GPU memory (not in general, just for your OS/driver/etc. combination).

For me it’s difficult to see the difference (my system is rather fast), but I do recall cases in the past where DX11 was noticeably slower (it involved assistants or stuff like that).

Once I get a working build from Dmitry, I will try to look harder and somehow measure the differences.

Me, too, I can’t get it to run. No chance whether I’m using the EXE to run that version, nor using the COM. It always crashes.

Windows 10 Pro
AMD MSI-RX580 8GB OC
HP Z620 with 2x XEON E5-2643 v2 @ 3.50GHz

Michelist