Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Bad Performance On Intel HD


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 markypooch   Members   -  Reputation: 525

Like
0Likes
Like

Posted 07 July 2014 - 04:45 PM

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

Sponsor:

#2 Adam_42   Crossbones+   -  Reputation: 2786

Like
8Likes
Like

Posted 07 July 2014 - 05:08 PM

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.


Edited by Adam_42, 07 July 2014 - 05:09 PM.


#3 mhagain   Crossbones+   -  Reputation: 9009

Like
6Likes
Like

Posted 08 July 2014 - 02:07 AM

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?


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#4 TheChubu   Crossbones+   -  Reputation: 6034

Like
2Likes
Like

Posted 08 July 2014 - 03:55 AM


. 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


#5 Jason Z   Crossbones+   -  Reputation: 5970

Like
0Likes
Like

Posted 08 July 2014 - 05:36 AM

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?



#6 markypooch   Members   -  Reputation: 525

Like
0Likes
Like

Posted 08 July 2014 - 11:11 AM

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!

#7 L. Spiro   Crossbones+   -  Reputation: 17327

Like
7Likes
Like

Posted 08 July 2014 - 11:27 AM

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

#8 Adam_42   Crossbones+   -  Reputation: 2786

Like
0Likes
Like

Posted 08 July 2014 - 06:10 PM


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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS