OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 9:31 AM
Also see this link (top post on page) for a user with the same problem:
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:
Another user with the same problem:
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.
1. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierStefan3D Sep 1, 2017 10:09 AM (in response to lfy)
Regarding Android emulator:
Install latest 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 UNIGINE Benchmarks ?
2. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 10:40 AM (in response to Stefan3D)
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.
3. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 10:47 AM (in response to lfy)
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.
4. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 12:06 PM (in response to lfy)
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
5. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 12:43 PM (in response to lfy)
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.
glFinishTest.zip - Google Drive
Below is the entire code of the application:
glFinishTest.cpp - Google Drive
// glFinishTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <SDL.h>
#include <gl\glew.h>
#include <gl\glu.h>
#include <stdio.h>
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;
}
6. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 1, 2017 12:44 PM (in response to lfy)
(You'll need to run the .exe from the zip in the same folder as the .exe, it needs the DLLs visible)
7. Re: OpenGL is super slow on Windows 10 + Intel HD 4000 and earlierlfy Sep 5, 2017 7:50 PM (in response to Stefan3D)
Ping - any luck with this?