Jump to content
  • Advertisement
Sign in to follow this  
Dragon_Strike

100 boxes at 50fps?

This topic is 3738 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

unfortunally i cant run perfHud on my laptop so i have no idea if this is ok or not... but im rendering about 100 boxes with vertex/indexbuffers (36 vertices and indices, 3600 vertices with 100 render calls) on a 8600GS (laptop) at about 40-50 fps... to me it sounds very slow... and i dont want to keep working knowing ive got some bug that eats all the perf... i know its hard to tell... but is 40-50 fps rly ok?

Share this post


Link to post
Share on other sites
Advertisement
Do you get any performance warnings from the debug runtimes? What sort of shaders/state settings are you using for each box?

There are many papers from nVidia and ATI that discuss performance optimizations. You can read some of them and see if you're doing anything inefficiently.

Share this post


Link to post
Share on other sites
this is the only debug info i get... i dont rly get it...



D3DX10: (INFO) Using Intel SSE2 optimizations
D3D10: INFO: ID3D10Device::IASetInputLayout: The currently bound InputLayout is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #30: IASETINPUTLAYOUT_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::VSSetShader: The currently bound VertexShader is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #33: VSSETSHADER_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::GSSetShader: The currently bound GeometryShader is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #37: GSSETSHADER_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::PSSetShader: The currently bound PixelShader is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #42: PSSETSHADER_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::GSSetConstantBuffers: A currently bound GeometryShader ConstantBuffer is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #39: GSSETCONSTANTBUFFERS_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::IASetVertexBuffers: A currently bound VertexBuffer is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #31: IASETVERTEXBUFFERS_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::PSSetSamplers: A currently bound PixelShader Sampler is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #45: PSSETSAMPLERS_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::OMSetDepthStencilState: The currently bound DepthStencilState is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #48: OMSETDEPTHSTENCILSTATE_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::PSSetShaderResources: A currently bound PixelShader ShaderResourceView is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #43: PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::IASetIndexBuffer: The currently bound IndexBuffer is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #32: IASETINDEXBUFFER_UNBINDDELETINGOBJECT ]
D3D10: INFO: ID3D10Device::OMSetRenderTargets: A currently bound RenderTargetView is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #49: OMSETRENDERTARGETS_UNBINDDELETINGOBJECT ]




im using directx 10..


HRESULT hr = D3DX10CreateEffectFromFile(filename.c_str(),
NULL,
NULL,
"fx_4_0",
D3D10_SHADER_ENABLE_STRICTNESS,
0,
pRenderdevice->Device(),
NULL,
NULL,
&pEffect_,
NULL,
NULL);





ive done "normal" profiling and havent found anything weird... also cpu usage is at 50%... so its clearly gpu related...

Share this post


Link to post
Share on other sites
Quote:
Original post by Dragon_Strike
ive done "normal" profiling and havent found anything weird... also cpu usage is at 50%... so its clearly gpu related...

With a dual-core that would mean that 1 core is running at 100%, so you might very well be CPU bound. Have you checked that you are actually getting HW acceleration ? (I don't know how that works with D3D and I don't know how fast it would be in software, but your performance seems to be ridiculously low.)

Share this post


Link to post
Share on other sites
Quote:
Original post by Eternal
Quote:
Original post by Dragon_Strike
ive done "normal" profiling and havent found anything weird... also cpu usage is at 50%... so its clearly gpu related...

With a dual-core that would mean that 1 core is running at 100%, so you might very well be CPU bound. Have you checked that you are actually getting HW acceleration ? (I don't know how that works with D3D and I don't know how fast it would be in software, but your performance seems to be ridiculously low.)


That's true, you're CPU limited :)

Check if shaders are not rendered in software.
Maybe too many vertices to compute ?

Share this post


Link to post
Share on other sites
I made few shaders in cg and the only way i got to check if the shader was rendered in software or in hardware was to check an anormal increase of cpu usage.

sorry i can't help you more than that in this subject :(

Share this post


Link to post
Share on other sites
ok ive been looking at it a bit more... and ive found a weird thing...

(im actually just rendering the boxes at the same place, it that does any difference)...


but if i get close to the boxes then my cpu usage falls and so does the fps to around 6-12...

however if i move away from the boxes then the cpu usages increases and the fps rises to 170....

this makes it probably gpu limited from my perspective...

wtf? only thing i can think of that would change is the mipmapping level of the textures...

Share this post


Link to post
Share on other sites
Quote:
Original post by Eternal
Quote:
Original post by Dragon_Strike
ive done "normal" profiling and havent found anything weird... also cpu usage is at 50%... so its clearly gpu related...

With a dual-core that would mean that 1 core is running at 100%, so you might very well be CPU bound. Have you checked that you are actually getting HW acceleration ? (I don't know how that works with D3D and I don't know how fast it would be in software, but your performance seems to be ridiculously low.)


D3D doesn't have a software fallback like OpenGL does. You can have software vertex processing, but only if you explicitly specify that you want it. There's also the reference rasterizer which is software-based, but again you need to explicitly specify that it's what you want.

Share this post


Link to post
Share on other sites
Quote:
if i get close to the boxes then my cpu usage falls and so does the fps to around 6-12...

however if i move away from the boxes then the cpu usages increases and the fps rises to 170....


That makes it sound like the pixel shader is the bottleneck (because as you get closer to the box, it occupies a larger area of the screen, meaning more pixels need to be processed, meaning the pixel shader is executed more often).

What sort of shader are you using?

Also, I imagine that all the boxes use the same states (same shader, same texture, same vertex declaration), so you should set these once before rendering all 100 boxes (if you're not doing that already).

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!