- 146 views
- 192 downloads
Data-Driven Analysis and Design of Vulkan Ray-Tracing Applications using Automatic Instrumentation
- Author / Creator
- Pankratz, David
Modern graphics Application Programming Interfaces (APIs) provide first-class support for ray tracing. Hardware vendors implement drivers for the graphics API including a black-box compiler. The black-box compiler creates architecture-specific binaries that leverage ray-tracing hardware acceleration. Ray-tracing support in modern APIs allows all geometry and shaders to be specified for a single execution. Thus, ray tracing is more complex and difficult to reason about than rasterization, a traditional rendering method. Ray-tracing developers must contend with the unknowns of an inscrutable GPU binary and a monolithic execution model. The increase in complexity from rasterization to ray tracing has not been accompanied by commensurate tooling.
This thesis first presents Vulkan Vision (V-Vision). V-Vision is a framework for developing instrumentation passes for shaders in the Vulkan graphics API. V-Vision handles the commonalities of generating, analyzing, and presenting instrumentation data. Specifically, V-Vision provides instrumentation primitives to capture a complete inter-shader and intra-shader ray-tracing execution trace. Instrumentation utilities implemented using V-Vision are operating-system, vendor, and architecture agnostic. V-Vision does not require source-code modification or recompilation. V-Vision's out-of-the-box instrumentation utilities demonstrate the ability to gather fine-grained execution data. Moreover, V-Vision's utilities are capable of measuring microarchitectural effects, such as independent thread scheduling. The execution data enables limit studies at hardware, compiler, and application levels. V-Vision's annotated shader and heatmap representations enable productive debugging and profiling. V-Vision has been accepted into the MindInsight tool family.
Next, this thesis presents RayScope. RayScope automatically captures application-agnostic ray-tracing execution data and geometry data from Vulkan applications. RayScope provides an interactive visualizer, populated using the ray tracing and geometry data. Therefore, RayScope can be understood as a set of tools that enables understanding, debugging, profiling, and designing through visualization of application execution data. RayScope implements an instrumentation pass and analysis using V-Vision but also implements Vulkan-API call instrumentation. RayScope's outputs are human-readable to encourage integration with other visualization and debugging tools. RayScope assisted in identifying longstanding bugs in Vulkan ray-tracing applications. RayScope further assisted in uncovering poorly defined minimum collision distances causing wasted computations in multiple ray-tracing applications. RayScope also helped identify geometry construction problems causing visual artifacts and wasteful computation in the well-known model Sponza. Finally, RayScope automatically identified a misconfiguration of Vulkan geometry flags and recommended a solution for one ray-tracing application. Applying the recommendation results in a reduction of 96.8% of any-hit shader executions.
The level of information provided to the developer has a large impact on the quality of the application that they develop. Changes motivated by the information provided by V-Vision and RayScope are often minimal but have tangible implications for performance and correctness. The effectiveness of V-Vision and RayScope indicates that tooling, and the knowledge it provides, was lacking for real-time hardware-accelerated ray tracing in Vulkan. The work presented in this thesis improves the tooling landscape by releasing V-Vision and RayScope as open-source projects, and improves the body of knowledge by sharing common pitfalls in real-time hardware-acceleration ray tracing.
- Graduation date
- Fall 2021
- Type of Item
- Master of Science
- This thesis is made available by the University of Alberta Libraries with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.