Crashes on Nvidia hardware

A few people have told me that my past two samples (Bokeh and RadiosityDX11) were crashing on Nvidia GPU’s, which I verified myself on my coworker’s GTX 470. The crash appears to be a driver bug, since it happens deep in the Nvidia runtime DLL on a worker thread and also because it works fine on AMD hardware and the REF device. This morning we managed to narrow it down to the shadow map filtering shader code (shader code can crash drivers apparently, who knew?), and I suspect that it’s the the fact that shader makes use of a SampleCmp with an integer offset. Commenting out the filtering and replacing it with a single SampleCmp seems to work, but I think using a regular texture coordinate offset might work as well. Anyone want to try putting this into “SampleShadowCascade” in Mesh.hlsl, and let me know if it works?

 

[unroll(NumSamples)]
for (int y = -Radius; y <= Radius; y++)
{
    [unroll(NumSamples)]
    for (int x = -Radius; x <= Radius; x++)
    {
        float2 offset = float2(x, y) * (1.0f / ShadowMapSize);
        float2 sampleCoord = shadowTexCoord + offset;
        float sample = ShadowMap.SampleCmp(ShadowSampler, sampleCoord, shadowDepth).x;
        ...
    }
}

New Series: D3D Performance and Debugging Tools Round-Up

Recently I’ve been spending a lot of time with the various performance and debugging utilities available for Direct3D, and I thought it might be useful to give a quick overview of what’s out there.  I’m sure most people who do a lot of Direct3D/XNA work are aware of these tools, but probably aren’t familiar with all of the really cool things you can do with them.

What I’m going to do is run through each tool one at a time, and share some of the common use cases and show some screenshots of features I think are neat. That way some people might learn about something they never knew about, and hopefully a few people can tell me about something I never knew about.

As of right now here’s the tools I’m planning to run through:

  1. PIX
  2. NVPerfHUD
  3. GPU PerfStudio
  4. NVShaderPerf
  5. GPU ShaderAnalyzer

Name Change

I got tired having an awkward mouthful of a blog name, so I decided to shorten it to something much snappier.  Hence “MJP’s XNA Danger Zone” becomes simply “The Danger Zone”. I like it better already.

Actually the main reason for the change is that I’ve been taking a break from the XNA stuff so that I can finally play around with DX11 a bit. In fact I’ve been working on a simple and flexible DX11 sample framework, so you may see a few DX11 samples from me in the future.  It should be fun, the new multi-threading features are really really cool. I’d like to do some compute shader stuff too, especially since I haven’t gotten around to playing with Cuda yet. I think tessellation will have to wait a bit though, since I don’t think I’m going to buy a DX11 GPU until the Fermi-based GPU’s from Nvidia come out. Until then, D3D_FEATURE_LEVEL_10_0 will have to do.

Cleared for takeoff

Look out interwebs, I have a new blog to call my own!

*insert trumpet fanfare here*

Here’s what I plan on doing with it:
-integrating some of the stuff I’ve been posting on gamedev.net and xnainfo.com in one place
-put up some samples/tutorials/tools/code I’ve come up with
-yammer on about JumpSwitch, the Xbox 360 game I’m working on
-set up a page to show some sweet pics and vids of JumpSwitch, so everyone can see how awesome it is
-post links to cool and helpful stuff I find
-try to somewhat serious (not likely to happen)

Exciting, right?

Follow

Get every new post delivered to your Inbox.

Join 34 other followers