Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Falcorum
Oct 21, 2010
You can also use bindless textures, but those are a recent-ish feature and aren't really present on older cards.

Adbot
ADBOT LOVES YOU

Falcorum
Oct 21, 2010

OneEightHundred posted:

How do you debug a compute shader in D3D if you're not rendering anything? AFAICT all of VS's graphics debugging stuff depends on frame capture, and it doesn't capture anything if a frame is never rendered.

Try renderdoc. As an added bonus if it works, you can live edit your compute shader.

Falcorum
Oct 21, 2010
Augh GPU time.

I have a compute shader using a RWTexture2DArray that does:
code:
Texture[coords] = max(Texture[coords], 0.5f);
(it's a minimum repro case, long story :v:)

Which works fine on a GTX 980, however on both a R480 and GTX 770 it does something along the lines of:

code:
Texture[coords] = Texture[coords] + 0.5f; // except it's more like 0.3 or something else, and just occasionally turns to NANs because why not
Time to look at the assembly output and see if the compiler's trying to be smart. :ughh:

Falcorum
Oct 21, 2010
D3D11, turns out the NAN stuff was a red herring and it was actually because I was reading and writing using a RWTexture2DArray for a cubemap. Turns out reading like that's fine on a 980 but breaks horribly in everything else (hurrah). Fixed by switching to doublebuffering and reading using a TextureCube and writing with a RWTexture2DArray. :shrug:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply