Remove generation of OpenCLDebugInfo100.h
This header is now pre-built as part of third_party/SPIRV-Headers
It was first added by https://swiftshader-review.googlesource.com/c/SwiftShader/+/43035
Bug: b/150936967
Change-Id: I2931cb6475fd2d99cdc015d1a2e3bd759f9255d6
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45309
Tested-by: Nicolas Capens <nicolascapens@google.com>
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
index e0bcfff..fe4b758 100644
--- a/.vscode/c_cpp_properties.json
+++ b/.vscode/c_cpp_properties.json
@@ -54,7 +54,6 @@
"VERIFY_LLVM_IR=1"
],
"includePath": [
- "${workspaceFolder}/build/spirv-tools-ext/include",
"${workspaceFolder}/include",
"${workspaceFolder}/src",
"${workspaceFolder}/third_party/benchmark/include",
diff --git a/src/Pipeline/CMakeLists.txt b/src/Pipeline/CMakeLists.txt
index 5c014ba..7b92eff 100644
--- a/src/Pipeline/CMakeLists.txt
+++ b/src/Pipeline/CMakeLists.txt
@@ -67,23 +67,6 @@
set_target_properties(spirv-tools-pkg-config PROPERTIES FOLDER "SPIRV-Tools build")
set_target_properties(spirv-tools-shared-pkg-config PROPERTIES FOLDER "SPIRV-Tools build")
-# Copy the OpenCLDebugInfo100.h header that's generated by SPIRV-Tools
-# out to a separate directory that can be added to the include path.
-# Ideally, this header would just be pre-built and part of SPIRV-Headers.
-# See: https://github.com/KhronosGroup/SPIRV-Headers/issues/137
-set(SPIRV_TOOLS_EXT_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/spirv-tools-ext/include)
-add_custom_command(
- OUTPUT "${SPIRV_TOOLS_EXT_INC_DIR}/spirv-tools/ext/OpenCLDebugInfo100.h"
- DEPENDS spirv-tools-header-OpenCLDebugInfo100
- COMMAND ${CMAKE_COMMAND} -E copy
- "${spirv-tools_BINARY_DIR}/OpenCLDebugInfo100.h"
- "${SPIRV_TOOLS_EXT_INC_DIR}/spirv-tools/ext/OpenCLDebugInfo100.h"
-)
-add_custom_target(spirv_tools_ext_includes
- DEPENDS "${SPIRV_TOOLS_EXT_INC_DIR}/spirv-tools/ext/OpenCLDebugInfo100.h")
-set_target_properties(spirv_tools_ext_includes PROPERTIES FOLDER "SPIRV-Tools build")
-add_dependencies(vk_pipeline spirv_tools_ext_includes)
-
set_target_properties(vk_pipeline PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "SwiftShader VK"
diff --git a/src/Pipeline/SpirvShaderDebugger.cpp b/src/Pipeline/SpirvShaderDebugger.cpp
index 7011cb8..3dddf38 100644
--- a/src/Pipeline/SpirvShaderDebugger.cpp
+++ b/src/Pipeline/SpirvShaderDebugger.cpp
@@ -26,7 +26,7 @@
# include "Vulkan/Debug/Thread.hpp"
# include "Vulkan/Debug/Variable.hpp"
-# include "spirv-tools/ext/OpenCLDebugInfo100.h"
+# include "spirv/unified1/OpenCLDebugInfo100.h"
# include "spirv-tools/libspirv.h"
# include <algorithm>
diff --git a/third_party/SPIRV-Tools/Android.bp b/third_party/SPIRV-Tools/Android.bp
index 765f90a..4cbf301 100644
--- a/third_party/SPIRV-Tools/Android.bp
+++ b/third_party/SPIRV-Tools/Android.bp
@@ -63,23 +63,6 @@
"$(location) --extinst-glsl-grammar=$(location :swiftshader_spirv_headers_unified1_extinst.glsl.std.450.grammar.json) --glsl-insts-output=$(location glsl.std.450.insts.inc); "
}
-
-genrule {
- name: "swiftshader_spvtools_generate_language_headers",
- out: [
- "DebugInfo.h",
- "OpenCLDebugInfo100.h",
- ],
- srcs: [
- "source/extinst.debuginfo.grammar.json",
- "source/extinst.opencl.debuginfo.100.grammar.json",
- ],
- tool_files: ["utils/generate_language_headers.py"],
- cmd:
- "$(location) --extinst-grammar=$(location source/extinst.debuginfo.grammar.json) --extinst-output-path=$(location DebugInfo.h); "+
- "$(location) --extinst-grammar=$(location source/extinst.opencl.debuginfo.100.grammar.json) --extinst-output-path=$(location OpenCLDebugInfo100.h); "
-}
-
genrule {
name: "swiftshader_spvtools_generate_registry_tables",
out: [
@@ -117,11 +100,11 @@
"include",
],
include_dirs: [
- "external/swiftshader/third_party/SPIRV-Headers/include"
+ "external/swiftshader/third_party/SPIRV-Headers/include/",
+ "external/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1/",
],
generated_headers: [
"swiftshader_spvtools_generate_grammar_tables",
- "swiftshader_spvtools_generate_language_headers",
"swiftshader_spvtools_update_build_version",
"swiftshader_spvtools_generate_registry_tables",
],