Bad Performance On Intel HD

Started by
6 comments, last by Adam_42 9 years, 9 months ago
Hello all,

I am coding a game in C/C++ using the d3d11 api. Everything is going along with minor issues here and there. But one big issue. I have a laptop that I decided to dub as a dev system. Since it's GPU is a Intel HD 2000 Solution If I get my game to perform well on that then it will run well on anything

Performance is TERRIBLE!

If im lucky 2-3 fps! Im only sending 4000-6000 triangles in a single update. And the shader im using handels 5 point lights with one directional light. The shader handels normal/shadow mapping as well (Shadow Mapping only for the directional Light) and about 80% of my geometry is sent down that pipeline.

I have some ideas on where my Performance is going down the tube. I have already ordered my data so that like gemotrey (with identical buffers and textures ect.) Is fed sequentially to D3D as to minimize context switches on the Gpu. But here it goes!

1. I do have a lot of draw calls, maybe instancing could help me (but my fear isthe intel hd "says" it supports d3d11 and all of its features
but only supports these features like instancing and tesselation at a minimum level.)

2. I should probably look into.vertex buffer batching. Since I do create a lot of seperate buffers for seperate objects. And resubmit them to the pipeline per update

3. Maybe the shader I am using or the gemoetry Im sending is to much. (Though even when i substituted shaders that did only basic texture mapping I still had a problem wih speed)

If I missed something let me know, or maybe if one of the above mentioned items is the optimization technique I should look into (or maybe all of them) let me know as well

Hp Laptop specs

i3m 2.3 2nd gen
8gb of ram
intel hd 2000
Advertisement

What you should always do first when you have a performance problem is try and work out what's slow by a process of elimination, or by using profilers. For example does the frame rate goes up significantly if you replace your pixel shader with one that only samples the diffuse texture?

Having said that, I'd bet that your pixel shader is the most expensive thing by far. One simple trick to optimize that is to create six different versions of it for different point light counts (zero lights to 5 lights). Pick the correct shader on the CPU based on how many lights actually affect the object (bounding sphere tests are cheap).

You can get a rough idea of how expensive a shader is by compiling it with the command line fxc.exe tool, and looking at the instruction count, although that won't take into account loops unless they get unrolled.

While it's true that if something runs well on a HD 2000 it will run well on anything, it's also true that the HD 2000 is almost right at the bottom of the lowest-of-low-end even for Intel integrated graphics. Perhaps looking for better performance from it is just not realistic?

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.


. I do have a lot of draw calls, maybe instancing could help me (but my fear isthe intel hd "says" it supports d3d11
Are you sure that isn't just Windows 7 reporting it has DX11? (as in D3D11 installed but feature level 10_1 supported).

Intel site says it supports up to DX10.1 only. http://www.intel.com/support/graphics/sb/CS-033757.htm (under 2nd generation).

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

What you should always do first when you have a performance problem is try and work out what's slow by a process of elimination, or by using profilers. For example does the frame rate goes up significantly if you replace your pixel shader with one that only samples the diffuse texture?

Having said that, I'd bet that your pixel shader is the most expensive thing by far. One simple trick to optimize that is to create six different versions of it for different point light counts (zero lights to 5 lights). Pick the correct shader on the CPU based on how many lights actually affect the object (bounding sphere tests are cheap).

You can get a rough idea of how expensive a shader is by compiling it with the command line fxc.exe tool, and looking at the instruction count, although that won't take into account loops unless they get unrolled.

All of this is great advice - take it to heart and try each of these ideas!

Shooting from the hip, I would say that your pixel shader is choking your GPU big time. 2-3 FPS sounds ridiculously low though - you can achieve that with the reference rasterizer in some cases... Have you tried to run any benchmark programs on that hardware to understand what performance you should be getting on it?

Status update!

Having my pixel shader only sample diffuse textures does make the game run at a playable frame rate. BUT only if I set a pretty low frustrum cull bound for the geometry ( which with the old shader still would be unplayable).

So I guess try instancing next. Maybe buffer batching? I have a bad feeling that maybe d3d is a bit thicker then I thought it was. And all the draw calls I have are eating my performance. When I could potentially consolidate many of them.

Wouldn't Intel HD if it only supported D3D10.1 crash my program when I create the device and explicitly tell it to use a d3d11 feature level and set the driver type to hardware?

Looks like downgrading the pixel shader helped some. I still can't render the whole scene without lagging and (with the whole scen in question) im not rendering more then 6000 triangles.

So ill give the profilier a shot. And if anyone else has any suggestions let me know!

Thanks for the replies!
Intel is notorious for not caring about its customers and providing them with the absolute worst graphics drivers—drivers that are literally made by monkeys paid in bananas working on The Galápagos Islands.

You need to verify your device is not a reference device, because it most likely is. That is the only way to explain the rates you are getting.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid


You need to verify your device is not a reference device, because it most likely is. That is the only way to explain the rates you are getting.

I'd be very surprised if it was a reference device, and it shouldn't be using a WARP device either unless you ask for it. What does GPU-Z say it supports?

Those Intel GPUs that are built into the CPUs aren't very fast though, it's not too hard to make something that runs horribly slowly on them but works nicely on a decent gaming graphics card.


So I guess try instancing next. Maybe buffer batching? I have a bad feeling that maybe d3d is a bit thicker then I thought it was. And all the draw calls I have are eating my performance. When I could potentially consolidate many of them.

While it's generally a good idea to reduce the draw call count, you won't know if that will help in this case without profiling. Try using https://software.intel.com/en-us/vcsource/tools/intel-gpa to guide you as to what to optimize.

This topic is closed to new replies.

Advertisement