Skip to content

Commit 2203e4c

Browse files
committed
Merge branch 'main' into block_read_2d_tester
2 parents a48173d + d583736 commit 2203e4c

File tree

29 files changed

+1975
-364
lines changed

29 files changed

+1975
-364
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
check:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2222

2323
- name: Check Tabs
2424
run: |
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ${{matrix.os}}
4040

4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4343

4444
- name: Get Ubuntu OpenGL Dependencies
4545
if: matrix.os == 'ubuntu-latest'
@@ -48,24 +48,31 @@ jobs:
4848
sudo apt-get install -y libglfw3-dev
4949
5050
- name: Get OpenCL Headers
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5252
with:
5353
repository: KhronosGroup/OpenCL-Headers
5454
path: external/OpenCL-Headers
5555

5656
- name: Get OpenCL ICD Loader
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5858
with:
5959
repository: KhronosGroup/OpenCL-ICD-Loader
6060
path: external/opencl-icd-loader
6161

6262
- name: Get OpenCL Extension Loader
6363
if: matrix.ext == 'YES'
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6565
with:
6666
repository: bashbaug/opencl-extension-loader
6767
path: external/opencl-extension-loader
6868

69+
- name: Get SPIR-V Headers
70+
if: matrix.ext == 'YES'
71+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
72+
with:
73+
repository: KhronosGroup/SPIRV-Headers
74+
path: external/SPIRV-Headers
75+
6976
- name: Create Build Directory
7077
run: cmake -E make_directory ${{runner.workspace}}/build
7178

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
5+
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
66

77
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
88
set(CMAKE_CXX_STANDARD 14)
@@ -36,6 +36,12 @@ else()
3636
message(STATUS "OpenCL Extension Loader is not found.")
3737
endif()
3838

39+
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/external/SPIRV-Headers)
40+
add_subdirectory(external/SPIRV-Headers)
41+
else()
42+
message(STATUS "SPIR-V Headers are not found.")
43+
endif()
44+
3945
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
4046
enable_testing()
4147
endif()

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Many samples that use extensions additionally require the OpenCL Extension Loade
3939

4040
git clone https://github.com/bashbaug/opencl-extension-loader external/opencl-extension-loader
4141

42+
Several samples that interact with SPIR-V require the SPIR-V headres:
43+
44+
git clone https://github.com/KhronosGroup/SPIRV-Headers external/SPIRV-Headers
45+
4246
After satisfying the external dependencies create build files using CMake. For example:
4347

4448
mkdir build && cd build

0 commit comments

Comments
 (0)