Jump to content
  • Advertisement
Sign in to follow this  
Messremb

[.net] NVPerfHUD 5 and mdx/xna?

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

I've tried to get NVIDIA PerfHUD 5 running on MDX and XNA, but i've failed. Every time i start nvperfhud with my mdx or xna application i get the following message: "ERROR: The developer of this application has not enabled NVIDIA PerfHUD analysis...". The user guide says, that the device must be created using the reference mode and the "NVIDIA PerfHUD" adapter. In mdx i create the device with the following code:
D3D.DeviceType devType = D3D.DeviceType.Hardware;
int adapter = D3D.Manager.Adapters.Default.Adapter;
System.Collections.IEnumerator adapters = D3D.Manager.Adapters.GetEnumerator();
while (adapters.MoveNext())
{
    D3D.AdapterInformation currentAdapter = (D3D.AdapterInformation)adapters.Current;
    if ("NVIDIA PerfHUD".Equals(currentAdapter.Information.Description))
    {
        adapter = currentAdapter.Adapter;
        devType = D3D.DeviceType.Reference;
        break;
    }
}
device = new D3D.Device(adapter, devType, handle, 
         D3D.CreateFlags.HardwareVertexProcessing, pp);



Any ideas? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure if I used this code for NVPerfHud 4 or 5, but this worked for me:


if (enabledNVidiaPerfHud)
{
if (Manager.Adapters[Manager.Adapters.Count - 1].Information.Description == "NVIDIA NVPerfHUD")
{
settings.AdapterOrdinal = (uint)Manager.Adapters.Count - 1;
settings.DeviceType = DeviceType.Reference;
}
}


As I recall, the guide says the instrumental adapter used with PerfHud will always be exposed as the last adapter in the enumeration, so by just checking the last one for the proper description, you'll know. You might want to recheck the guide to see what the proper description should be, but since this came from working code I'm pretty sure it should be "NVIDIA NVPerfHUD".

Share this post


Link to post
Share on other sites
Quote:
Original post by remigiusYou might want to recheck the guide to see what the proper description should be, but since this came from working code I'm pretty sure it should be "NVIDIA NVPerfHUD".

They changed the description in version 5 to "NVIDIA PerfHUD" (without the NV).

However, I found a thread in the public nvidia development forum that says there is a bug with managed directx and will be fixed ASAP [rolleyes]



Share this post


Link to post
Share on other sites
Sorry for the misinformation then. Quite puzzling that NVPerfHud worked when MDX was pretty much unknown and that they've managed to break it now managed code is becoming more popular. [rolleyes] indeed

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!