Instrument: Debug Printf support (#3215)
Create a pass to instrument OpDebugPrintf instructions. This pass replaces all OpDebugPrintf instructions with instructions to write a record containing the string id and the all specified values into a special printf output buffer (if space allows). This pass is designed to support the printf validation in the Vulkan validation layers.
Fixes #3210
diff --git a/BUILD.gn b/BUILD.gn
index 1337059..d3107fd 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -590,6 +590,8 @@
"source/opt/inst_bindless_check_pass.h",
"source/opt/inst_buff_addr_check_pass.cpp",
"source/opt/inst_buff_addr_check_pass.h",
+ "source/opt/inst_debug_printf_pass.cpp",
+ "source/opt/inst_debug_printf_pass.h",
"source/opt/instruction.cpp",
"source/opt/instruction.h",
"source/opt/instruction_list.cpp",