Skip to content

Commit

Permalink
opt: Remove InstDebugPrintfPass (#5856)
Browse files Browse the repository at this point in the history
This code was only used by Vulkan-Validation layers and it has
now been replaced by code in that repository.
  • Loading branch information
jeremyg-lunarg authored Oct 17, 2024
1 parent 14388d7 commit ba37b3b
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 2,138 deletions.
2 changes: 0 additions & 2 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/inline_pass.cpp \
source/opt/inline_exhaustive_pass.cpp \
source/opt/inline_opaque_pass.cpp \
source/opt/inst_debug_printf_pass.cpp \
source/opt/instruction.cpp \
source/opt/instruction_list.cpp \
source/opt/instrument_pass.cpp \
source/opt/interface_var_sroa.cpp \
source/opt/interp_fixup_pass.cpp \
source/opt/invocation_interlock_placement_pass.cpp \
Expand Down
2 changes: 0 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ cc_library(
cc_library(
name = "spirv_tools_opt",
hdrs = [
"include/spirv-tools/instrument.hpp",
"include/spirv-tools/optimizer.hpp",
],
copts = COMMON_COPTS,
Expand All @@ -196,7 +195,6 @@ cc_library(
":gen_vendor_tables_spv_amd_shader_ballot",
],
hdrs = glob(["source/opt/*.h"]) + [
"include/spirv-tools/instrument.hpp",
"include/spirv-tools/optimizer.hpp",
],
copts = COMMON_COPTS,
Expand Down
5 changes: 0 additions & 5 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ config("spvtools_internal_config") {

source_set("spvtools_headers") {
sources = [
"include/spirv-tools/instrument.hpp",
"include/spirv-tools/libspirv.h",
"include/spirv-tools/libspirv.hpp",
"include/spirv-tools/linker.hpp",
Expand Down Expand Up @@ -683,14 +682,10 @@ static_library("spvtools_opt") {
"source/opt/inline_opaque_pass.h",
"source/opt/inline_pass.cpp",
"source/opt/inline_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",
"source/opt/instruction_list.h",
"source/opt/instrument_pass.cpp",
"source/opt/instrument_pass.h",
"source/opt/interface_var_sroa.cpp",
"source/opt/interface_var_sroa.h",
"source/opt/interp_fixup_pass.cpp",
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/libspirv.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/optimizer.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/linker.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/instrument.hpp
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/spirv-tools/)
endif(ENABLE_SPIRV_TOOLS_INSTALL)
Expand Down
79 changes: 0 additions & 79 deletions include/spirv-tools/instrument.hpp

This file was deleted.

12 changes: 0 additions & 12 deletions include/spirv-tools/optimizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,18 +747,6 @@ Optimizer::PassToken CreateReduceLoadSizePass(
// them into a single instruction where possible.
Optimizer::PassToken CreateCombineAccessChainsPass();

// 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.
//
// The instrumentation will write buffers in debug descriptor set |desc_set|.
// It will write |shader_id| in each output record to identify the shader
// module which generated the record.
Optimizer::PassToken CreateInstDebugPrintfPass(uint32_t desc_set,
uint32_t shader_id);

// Create a pass to upgrade to the VulkanKHR memory model.
// This pass upgrades the Logical GLSL450 memory model to Logical VulkanKHR.
// Additionally, it modifies memory, image, atomic and barrier operations to
Expand Down
4 changes: 0 additions & 4 deletions source/opt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ set(SPIRV_TOOLS_OPT_SOURCES
inline_exhaustive_pass.h
inline_opaque_pass.h
inline_pass.h
inst_debug_printf_pass.h
instruction.h
instruction_list.h
instrument_pass.h
interface_var_sroa.h
invocation_interlock_placement_pass.h
interp_fixup_pass.h
Expand Down Expand Up @@ -185,10 +183,8 @@ set(SPIRV_TOOLS_OPT_SOURCES
inline_exhaustive_pass.cpp
inline_opaque_pass.cpp
inline_pass.cpp
inst_debug_printf_pass.cpp
instruction.cpp
instruction_list.cpp
instrument_pass.cpp
interface_var_sroa.cpp
invocation_interlock_placement_pass.cpp
interp_fixup_pass.cpp
Expand Down
Loading

0 comments on commit ba37b3b

Please sign in to comment.