100 boxes at 50fps?

Started by
13 comments, last by Dragon_Strike 16 years ago
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?
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.
this is the only debug info i get... i dont rly get it...


D3DX10: (INFO) Using Intel SSE2 optimizationsD3D10: 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...
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.)
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 ?
its not to many vertices... and how do i check if its rendered in software or hardware?
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 :(
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...
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.
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).

This topic is closed to new replies.

Advertisement