Original title:
Ladění GLSL
Translated title:
Tool for GLSL Shader Debugging
Authors:
Sabela, Ondřej ; Pečiva, Jan (referee) ; Milet, Tomáš (advisor) Document type: Master’s theses
Year:
2025
Language:
eng Publisher:
Vysoké učení technické v Brně. Fakulta informačních technologií Abstract:
[eng][cze]
Tato práce představuje flexibilní hardware-agnostický nástroj pro ladění programů vykonávaných grafickým procesorem, tzv. shaderů. Cílem je vytvořit prostředí podobné tradičním ladícím nástrojům, nabídnout známé funkce, jako je krokování programu a výpis proměnných, ale také pokročilé funkce pro inspekci grafické pipeline a hybridní (fyzický i virtuální) souborový systém pro správu zdrojových kódu. Motivací je nejen absence podobného nástroje pro OpenGL, ale také přínosy, které tyto nástroje poskytují při vývoji tradičních programů - hluboký vhled do jejich vykovávání a stavu v reálném čase. Text práce popisuje princip injekce ladící vrstvy mezi aplikaci a grafickou knihovnu, návrh flexibilní rozšířítelné platformy pro implementaci instrumentace (přepisování) kódu shaderů v reálnem čáse a pojednává o klíčových vlastnostech grafického hardware, komponent operačních systémů, vysoko- a nízko-úrovňových jazyků pro psaní shaderů. Výsledkem je soběstačná knihovna a sada programů poskytujících intuitivní rozhraní pro připojení k laděnému programu, a grafické rozhraní k ovládání ladícího programu ve formě rozšíření pro Visual Studio Code.
Traditional source-level debuggers offer invaluable insights into program execution and state in real time. However, graphics processor programs - shaders - and particularly OpenGL lack a tool that provides such a workflow. This work presents a flexible, hardware-agnostic solution to fill this gap. The goal is to support familiar features like step-through debugging and variable watching, along with advanced features like graphics pipeline inspection and a hybrid (both physical and virtual) file system for managing source codes. This thesis describes the employed shared library hooking mechanism to inject a debug layer between the graphics API and the target application. It also details the implementation of transparent on-the-fly shader recompilation and instrumentation platform, as well as the communication interfaces and protocols utilized. Additionally, the thesis discusses key design considerations across hardware, libraries, both high- and low-level shading languages and operating system components. The resulting toolkit comprises a standalone library and applications for attaching to the target application, along with an extension for controlling the debugger from Visual Studio Code, enhancing the debugging experience for shader developers.
Keywords:
GLSL; injekce; instrumentace; krokování; ladící program; OpenGL; přepisování kódu za běhu; sada nástrojů; sdílená knihovna; shader; Visual Studio Code.; Vulkan; debugger; GLSL; inspection; instrumentation; interception; interposition; on-the-fly code rewriting; OpenGL; shader; shared library; step-through; toolkit; Visual Studio Code.; Vulkan
Institution: Brno University of Technology
(web)
Document availability information: Fulltext is available in the Brno University of Technology Digital Library. Original record: https://hdl.handle.net/11012/255115