Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate extension headers from SPIRV-Tools to SPIRV-Headers #137

Open
ben-clayton opened this issue Jan 13, 2020 · 2 comments
Open

Migrate extension headers from SPIRV-Tools to SPIRV-Headers #137

ben-clayton opened this issue Jan 13, 2020 · 2 comments

Comments

@ben-clayton
Copy link

SPIRV-Tools contains the following SPIR-V instruction extension definition files:

SPIR-V Tools uses these to produce header files into an intermediate directory as part of the build. Projects that wish to make use of these will need to either fetch these out of the intermediate directory, or re-generate them itself (both approaches requiring custom build rules).

It would be far more convenient if these headers were pre-built and were part of SPIRV-Headers, much like GLSL.std.450.h.

amaiorano pushed a commit to amaiorano/swiftshader that referenced this issue Jan 17, 2020
SPIRV-Tools generates extension header files into the the project's intermediate build directory. SpirvShader needs to include `OpenCLDebugInfo100.h`, so copy this out to a "clean room" include directory and add this directory to the vk_swiftshader INCLUDE_DIRECTORIES.

All of this smell should go away once KhronosGroup/SPIRV-Headers#137 is addressed.

Bug: b/145351270
Change-Id: Ib9205e04d32e2d8e0a6516449ec9114a3ff6dd94
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40090
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
amaiorano pushed a commit to amaiorano/swiftshader that referenced this issue Jan 17, 2020
37f3018 added CMake rules to copy the `OpenCLDebugInfo100.h` header out of a polluted build intermediate directory and into a separate include directory.

Add this include directory to the .vscode include paths so vscode can also find it.

All of this smell should go away once KhronosGroup/SPIRV-Headers#137 is addressed.

Bug: b/145351270
Change-Id: I1a20e6f6b507e10c90fed38dd8a94d4b3ff590f7
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40129
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
@c0d1f1ed
Copy link

c0d1f1ed commented Apr 3, 2020

https://swiftshader-review.googlesource.com/c/SwiftShader/+/43428 was landed as a workaround in SwiftShader. We can remove that section from our CMakeLists.txt once this gets addressed in SPIRV-Headers.

ben-clayton added a commit to ben-clayton/swiftshader that referenced this issue Apr 21, 2020
KhronosGroup/SPIRV-Headers#137 is still ongoing.

Fixes: b/15093697
Change-Id: I2498f35a8049fb2a1a86aa0efe6fbd6e59ad6493
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43428
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
@c0d1f1ed
Copy link

c0d1f1ed commented May 25, 2020

This appears to have been fixed by @dneto0 as part of #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants