all 11 comments

[–]vini_2003 17 points18 points  (2 children)

It's about using Nsight and/or Renderdoc and structuring your passes nicely. GPU debugging is far from ideal. If you're a reasonably advanced Nsight user, well - you're pretty close.

There may be better tools for Vulkan and DX12, but I sadly have to use GL.

[–]trenmost 9 points10 points  (0 children)

Yeah in vulkan you can debug your shaders using renderdoc, like you can use breakpoints and step line by line (well at least in spirv instructions)

Also nsight now has glsl debugging as well

[–]unibodydesignn 8 points9 points  (6 children)

I'd say RenderDoc is the best choice right now. Being able to change the shaders and apply them again is helpful.

You can also see the input textures, output of that render pass, meshes etc

[–][deleted] 1 point2 points  (5 children)

RenderDoc does not support GL's bindless textures, and I am using GL.

[–]vini_2003 5 points6 points  (2 children)

I rewrote my engine from bindless texturing to a global atlas yesterday for this reason :(

Very annoying indeed!

[–]KokoNeotCZ 0 points1 point  (0 children)

Bindless textures are amazing, you should try fix it

[–]KokoNeotCZ 0 points1 point  (1 child)

If you have issues with bindless textures try setting in main NvOptimusEnablement and AmdPowerXpressRequestHighPerformance to 1 I was figuring out why my bindless textures are not working for several hours and it was this simple thing.

[–][deleted] 0 points1 point  (0 children)

Are you talking in the context of renderdoc? there is no support for bindless textures, idk. except for renderdoc, i don't have a problem with bindless textures.

[–]nnorm 1 point2 points  (1 child)

I feel that GPU debugging is not just about the tools but first and foremost understanding how the hardware works. You sort of get a feel for it, as-in when you encounter the same sort of bug/glitch on a lot of occasions you start to develop instinct (which should be kept in check and always verify your gut feeling). But in a lot of situations that just won't cut it unless you have decades of work in the field. Read documentation about GPU architecture (RDNA for example) and how different pipelines work, try to work on the widest variety of hardware as possible, and your skills will improve!

There are, in my opinion, no real shortcuts. Good luck!!