Jump to content
  • Advertisement
Sign in to follow this  
markypooch

Bad Performance On Intel HD

This topic is 1559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

 

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?

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!