A fresh announcement for developers today is GPU Reshape, a free and open source tool that could be really useful for game developers working with Vulkan and DirectX 12 to deal with potentially undefined behaviour.
According to the post it's a collaboration between AMD and Avalanche Studios Group, which then continued externally with Miguel Petersen of Striking Distance Studios (prev at Avalanche) who is the author of GPU Reshape with help from various other developers. Great to see AMD and more game developers value open source.
What is it actually for? If you're not a game developer, it's probably complicated to understand. It's not my expertise either, but I love seeing game developer toolkits like this release as open source. Petersen even clearly states in the post that Linux support is planned for it! For more games to support Linux / Steam Deck well — developers need the tools too. As per the blog post Petersen explained it as:
A toolset that leverages on-the-fly instrumentation of GPU operations with instruction-level validation of potentially undefined behavior, supporting both DX12 and Vulkan. A standalone desktop application with no integration required, all open source (MIT), is now available in Beta.
GPU Reshape brings powerful features typical of CPU tooling to the GPU, providing validation of dynamic behaviour, such as:
- Resource Bounds Validation of resource read / write coordinates against its bounds.
- Export Stability Numeric stability validation of floating point exports (UAV writes, render targets, vertex exports), e.g. NaN / Inf.
- Descriptor Validation Validation of descriptors, potentially dynamically indexed. This includes undefined, mismatched (compile-time to runtime), out of bounds descriptor indexing, and missing table bindings.
- Concurrency Validation Validation of resource concurrency, i.e. single-producer or multiple-consumer, between queues and events.
- Resource Initialization Validation of resource initialization, ensures any read was preceded by a write. (*1)
- Infinite Loops Detection of infinite loops. Experimental.
There's a number of other planned additions, as they hope to see it evolve into a general purpose tool including:
- Shader debugging, providing the ability to inspect live data as the shader sees it.
- Shader assertions, in source assertions typical of CPU code.
- Branch hot spots, live hot spot profiling of all branches.
- Branch coherence, live coherence analysis of all branches.
- And more!
See more on the AMD blog post.