[C# + MDX] Nprof analysis result and performance

Started by
0 comments, last by remigius 17 years, 8 months ago
Here is the Nprof Profiler result :

Total with children : 35.62%
Microsoft.DirectX.Direct3D.Device::Present()                         		00.02%        
	Microsoft.DirectX.Direct3D.Device::PresentInternal                   		35.52%


Total with children times : 27.84%
void Microsoft.DirectX.GraphicsStream::Write()                       		00.74%         
   static int32 Microsoft.DirectX.DXHelp::GetObjectSize(Object)         		10.47%
   static void Microsoft.DirectX.DXHelp::CopyObjectDataToPointer(Object,int)		16.52%
[/c#]

It means that more the 50% of my engine process time is used to do device.Present() and GraphicStream.Write() fonction.
Is it normal ?

The graphicStream is created with : 

vertexBuffer = new VertexBuffer(
                            BufVertexType,
                            BufferSize
                            device,
                            Usage.Dynamic|Usage.WriteOnly,
                            BufVertexFormat,
                            Pool.Default);

graphicStream = vertexBuffer.lock(0,0,LockFlags.Discard)


Advertisement
This is probably expected behavior, check out Tom's excellent DX FAQ for info about this phenomenon. For profiling Direct3D applications, it can be more useful to use the PIX profiler.
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement