Skip to content

Commit

Permalink
Use SPIR-V headers from the KhronosGroup/SPIRV-Headers repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
antiagainst authored and dneto0 committed Jun 10, 2016
1 parent 6fff41a commit 10dba91
Show file tree
Hide file tree
Showing 30 changed files with 53 additions and 13,236 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ build*
.ycm_extra_conf.py*
compile_commands.json
/external/googletest/
/external/spirv-headers/
/TAGS
/.clang_complete
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi

before_script:
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
- git clone https://github.com/google/googletest.git external/googletest

script:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ We intend to maintain a linear history on the GitHub `master` branch.
* `external/googletest`: Intended location for the
[googletest][googletest] sources, not provided
* `include/`: API clients should add this directory to the include search path
* `external/spirv-headers`: Intended location for
[SPIR-V headers][spirv-headers], not provided
* `include/spirv-tools/libspirv.h`: C API public interface
* `include/spirv/` : Contains header files from the SPIR-V Registry, required
by the public API.
* `source/`: API implementation
* `test/`: Tests, using the [googletest][googletest] framework
* `tools/`: Command line executables
Expand All @@ -102,7 +102,8 @@ In particular, googletest must be newer than version 1.7.0.
## Build

The project uses [CMake][cmake] to generate platform-specific build
configurations. To generate these build files, issue the following commands:
configurations. After checking out [SPIR-V headers][spirv-headers] and
[googletest][googletest] into `external/`. issue the following commands:

```
mkdir <spirv-dir>/build
Expand Down Expand Up @@ -267,6 +268,7 @@ MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
```

[spirv-registry]: https://www.khronos.org/registry/spir-v/
[spirv-headers]: https://github.com/KhronosGroup/SPIRV-Headers
[googletest]: https://github.com/google/googletest
[googletest-pull-612]: https://github.com/google/googletest/pull/612
[googletest-issue-610]: https://github.com/google/googletest/issues/610
Expand Down
14 changes: 14 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

if (DEFINED SPIRV-Headers_SOURCE_DIR)
# This allows flexible position of the SPIRV-Headers repo.
set(SPIRV_HEADER_DIR ${SPIRV-Headers_SOURCE_DIR})
else()
set(SPIRV_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers)
endif()

if (IS_DIRECTORY ${SPIRV_HEADER_DIR})
set(SPIRV_HEADER_INCLUDE_DIR ${SPIRV_HEADER_DIR}/include PARENT_SCOPE)
else()
message(FATAL_ERROR
"SPIRV-Headers was not found - please checkout a copy under external/.")
endif()

if (NOT ${SPIRV_SKIP_EXECUTABLES})
# Find gmock if we can. If it's not already configured, then try finding
# it in external/googletest.
Expand Down
131 changes: 0 additions & 131 deletions include/spirv/GLSL.std.450.h

This file was deleted.

Loading

0 comments on commit 10dba91

Please sign in to comment.