Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20979 Discussions

OpenGL is super slow on Windows 10 + Intel HD 4000 and earlier

FYang10
Beginner
5,715 Views

Also see this link (top post on page) for a user with the same problem:

https://intel-openport-v7.hosted.jivesoftware.com/thread/113216?start=15&tstart=0 Windows 10 Creators Update* & Intel® HD Gra... |Intel Communities

I've reproduced this issue with the Android Emulator, and the workaround seems to be to disable glFinish, glClientWaitSync, or any OpenGL call that involves waiting on OpenGL commands to complete.

More info here:

https://issuetracker.google.com/issues/37139095 https://issuetracker.google.com/issues/37139095

Another user with the same problem:

https://github.com/vispy/vispy/issues/1318 https://github.com/vispy/vispy/issues/1318

My guess is that in the latest Windows 10 updates, a Windows API call's behavior changed in a way that broke some client-side waiting code in the Intel driver. Now, instead of waiting until GPU commands complete, the wait fails and we reach the maximum timeout, which seems to be around 5 seconds. So that means every time glFinish (or similar command) is called, a 5 second pause is incurred.

This doesn't just happen on Intel HD 4000; it seems every model earlier than that is affected as well. Driver updates do not help, and to make things even worse, many of the earlier models have had their support discontinued.

0 Kudos
7 Replies
Stefan3D
Honored Contributor II
3,311 Views

Regarding Android emulator:

Install latest https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager Intel® Hardware Accelerated Execution Manager (Intel® HAXM) | Intel® Software

Does it happen only with the Android emulator or other apps as well, e.g. with https://benchmark.unigine.com/ UNIGINE Benchmarks ?

0 Kudos
FYang10
Beginner
3,311 Views

The problem occurs with HAXM running. Please see the user reports. Even if HAXM was not installed, we would not take 5 seconds to post a frame; code translation is not that slow.

Please follow the links in the OP. Other people have had the same problem with other apps.

Benchmarks are not a good test of this since they might not call glFinish or glClientWaitSync.

0 Kudos
FYang10
Beginner
3,311 Views

As other users mentioned, CAD software is also affected.

In fact, I'll just fire up Visual Studio and make a SDL app with OpenGL that reproduces the problem minimally.

0 Kudos
FYang10
Beginner
3,311 Views

Here is another repro case - Dota 2

1. Download Steam + Dota 2

2. Download the Windows OpenGL support DLC

3. Right click Dota 2 entry > Properties > Set Launch Options.... and add "-gl" to the startup parameters

4. Launch Dota 2

5. Try to click on the settings icon, or anywhere in the UI

0 Kudos
FYang10
Beginner
3,311 Views

Here is a minimal repro case. The app sets the clear color to some value, then swaps buffer. Inserting a glFinish causes every buffer swap to take several seconds.

https://drive.google.com/open?id=0Bz-8J2L_wZXHVlo1c0lRNXhSSDQ glFinishTest.zip - Google Drive

Below is the entire code of the application:

https://drive.google.com/open?id=0Bz-8J2L_wZXHMTRiUXUxTHpmd2c glFinishTest.cpp - Google Drive

// glFinishTest.cpp : Defines the entry point for the console application.

//

# include "stdafx.h"

# include

# include

# include

# include

SDL_Window* sWindow = nullptr;

SDL_GLContext sContext;

static float colors[] = {

0.1, 0.5, 0.4,

};

# undef main

int main()

{

fprintf(stderr, "%s: starting glFinish tests\n", __func__);

SDL_Init(SDL_INIT_VIDEO);

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);

SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);

sWindow = SDL_CreateWindow("glFInishTest", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 512, 512, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);

sContext = SDL_GL_CreateContext(sWindow);

glewExperimental = GL_TRUE;

glewInit();

SDL_GL_SetSwapInterval(1);

SDL_Event ev;

int i = 0;

while (true) {

SDL_PollEvent(&ev);

if (ev.type == SDL_QUIT) break;

glClearColor(colors[i % 3], colors[(i + 1) % 3], colors[(i + 2) % 3], 0.0f);

glClear(GL_COLOR_BUFFER_BIT);

fprintf(stderr, "waiting for glFinish...\n");

glFinish(); //uncommment this line to speed everything up.

fprintf(stderr, "done waiting for glFinish\n");

SDL_GL_SwapWindow(sWindow);

i++;

}

return 0;

}

0 Kudos
FYang10
Beginner
3,311 Views

(You'll need to run the .exe from the zip in the same folder as the .exe, it needs the DLLs visible)

0 Kudos
FYang10
Beginner
3,311 Views
0 Kudos
Reply