Skip to content

Commit ef3ff92

Browse files
committed
docs: Add comprehensive Vulkan testing guides for PR #2243
Add detailed testing documentation to help reviewers and contributors test the Vulkan unit test framework locally. Files added: - VULKAN_TESTING_GUIDE.md: Comprehensive guide with installation instructions for macOS, Linux, and Windows, build configuration, troubleshooting, and platform-specific notes - QUICK_TEST_STEPS.md: Quick reference guide with fast-track installation and testing steps for each platform These guides address the request from @doug-walker to provide instructions for installing Vulkan SDK and glslang dependencies needed to test the Vulkan branch locally. Signed-off-by: pmady <pavan4devops@gmail.com>
1 parent c3037be commit ef3ff92

File tree

2 files changed

+518
-0
lines changed

2 files changed

+518
-0
lines changed

QUICK_TEST_STEPS.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Quick Testing Steps for PR #2243
2+
3+
Hi @doug-walker! Here are the quick steps to test the Vulkan branch:
4+
5+
## Quick Start (macOS)
6+
7+
```bash
8+
# 1. Install dependencies
9+
brew install vulkan-sdk glslang
10+
11+
# 2. Set environment variables
12+
export VULKAN_SDK=/usr/local/share/vulkan
13+
export PATH=$VULKAN_SDK/bin:$PATH
14+
export VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json
15+
16+
# 3. Verify installation
17+
vulkaninfo --summary
18+
glslangValidator --version
19+
20+
# 4. Clone and build
21+
git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git
22+
cd OpenColorIO
23+
git remote add pmady https://github.com/pmady/OpenColorIO.git
24+
git fetch pmady
25+
git checkout pmady/vulkan-unit-tests
26+
27+
mkdir build && cd build
28+
cmake .. \
29+
-DCMAKE_BUILD_TYPE=Release \
30+
-DOCIO_BUILD_TESTS=ON \
31+
-DOCIO_VULKAN_ENABLED=ON \
32+
-Dglslang_DIR=/usr/local/lib/cmake/glslang
33+
34+
cmake --build . -j$(sysctl -n hw.ncpu)
35+
36+
# 5. Run tests
37+
./tests/gpu/ocio_gpu_test --vulkan
38+
```
39+
40+
## Quick Start (Linux - Ubuntu/Debian)
41+
42+
```bash
43+
# 1. Install dependencies
44+
sudo apt-get update
45+
sudo apt-get install -y vulkan-tools libvulkan-dev vulkan-validationlayers \
46+
glslang-tools libglslang-dev mesa-vulkan-drivers
47+
48+
# 2. Verify installation
49+
vulkaninfo --summary
50+
glslangValidator --version
51+
52+
# 3. Clone and build
53+
git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git
54+
cd OpenColorIO
55+
git remote add pmady https://github.com/pmady/OpenColorIO.git
56+
git fetch pmady
57+
git checkout pmady/vulkan-unit-tests
58+
59+
mkdir build && cd build
60+
cmake .. \
61+
-DCMAKE_BUILD_TYPE=Release \
62+
-DOCIO_BUILD_TESTS=ON \
63+
-DOCIO_VULKAN_ENABLED=ON
64+
65+
cmake --build . -j$(nproc)
66+
67+
# 4. Run tests
68+
./tests/gpu/ocio_gpu_test --vulkan
69+
```
70+
71+
## Quick Start (Windows)
72+
73+
```powershell
74+
# 1. Download and install Vulkan SDK from:
75+
# https://vulkan.lunarg.com/sdk/home#windows
76+
77+
# 2. Verify installation (in PowerShell)
78+
vulkaninfo --summary
79+
glslangValidator --version
80+
81+
# 3. Clone and build
82+
git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git
83+
cd OpenColorIO
84+
git remote add pmady https://github.com/pmady/OpenColorIO.git
85+
git fetch pmady
86+
git checkout pmady/vulkan-unit-tests
87+
88+
mkdir build
89+
cd build
90+
cmake .. -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DOCIO_BUILD_TESTS=ON -DOCIO_VULKAN_ENABLED=ON
91+
cmake --build . --config Release
92+
93+
# 4. Run tests
94+
.\tests\gpu\Release\ocio_gpu_test.exe --vulkan
95+
```
96+
97+
## Common Issues
98+
99+
**CMake can't find glslang:**
100+
```bash
101+
# Find glslang location
102+
find /usr -name "glslangConfig.cmake" 2>/dev/null
103+
104+
# Add to cmake command:
105+
cmake .. -Dglslang_DIR=/path/to/glslang/lib/cmake/glslang ...
106+
```
107+
108+
**No Vulkan device found:**
109+
```bash
110+
# Check Vulkan installation
111+
vulkaninfo
112+
113+
# On Linux, install GPU drivers:
114+
sudo apt-get install mesa-vulkan-drivers # For Intel/AMD
115+
# Or install NVIDIA/AMD proprietary drivers
116+
```
117+
118+
**Tests crash:**
119+
```bash
120+
# Enable validation layers for debugging
121+
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
122+
./tests/gpu/ocio_gpu_test --vulkan
123+
```
124+
125+
## Expected Output
126+
127+
```
128+
[==========] Running tests...
129+
[----------] Tests from GPURenderer
130+
[ RUN ] GPURenderer.simple_transform
131+
Vulkan device: <Your GPU Name>
132+
[ OK ] GPURenderer.simple_transform
133+
...
134+
[ PASSED ] All tests
135+
```
136+
137+
For detailed instructions, see the full [VULKAN_TESTING_GUIDE.md](./VULKAN_TESTING_GUIDE.md).
138+
139+
Let me know if you run into any issues!

0 commit comments

Comments
 (0)