Skip to content

Commit

Permalink
OpenShadingLanguage : Build with Optix support on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Oct 9, 2024
1 parent 02b3229 commit 8ef4b2d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: linux-gcc11
os: ubuntu-20.04
publish: true
containerImage: ghcr.io/gafferhq/build/build:3.0.0
containerImage: ghcr.io/gafferhq/build/build:3.1.0
jobs: 4

- name: macos-arm64
Expand Down
4 changes: 3 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
9.0.0 alpha x (relative to 9.0.0 alpha 3)
-------------

- OpenShadingLanguage : Updated to version 1.13.11.0.
- OpenShadingLanguage :
- Updated to version 1.13.11.0.
- Enabled Optix support on Linux.

9.0.0 alpha 3 (relative to 9.0.0 alpha 2)
-------------
Expand Down
18 changes: 17 additions & 1 deletion LLVM/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,26 @@
" -DLLVM_ENABLE_ZSTD=OFF"
" -DLLVM_INCLUDE_BENCHMARKS=OFF"
" -DLLVM_INCLUDE_TESTS=OFF"
" -DLLVM_TARGETS_TO_BUILD='Native'"
" -DLLVM_TARGETS_TO_BUILD={buildTargets}"
" ..",
"cd build && make install -j {jobs}"

],

"variables" : {

"buildTargets" : "'Native'",

},

"platform:linux" : {

"variables" : {

"buildTargets" : "'Native;NVPTX'",

},

},

}
14 changes: 14 additions & 0 deletions OpenShadingLanguage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"DYLD_FALLBACK_LIBRARY_PATH" : "{buildDir}/lib",
"LD_LIBRARY_PATH" : "{buildDir}/lib",
"PATH" : "{buildDir}/bin:$PATH",
# We define `OPTIX_ROOT_DIR` in the build container for
# Cycles to find it, but OSL wants `OPTIX_INSTALL_DIR`.
"OPTIX_INSTALL_DIR" : "$OPTIX_ROOT_DIR",

},

Expand All @@ -37,6 +40,7 @@
" -D OSL_SHADER_INSTALL_DIR={buildDir}/shaders"
" -D Python_ROOT_DIR={buildDir}"
" -D Python_FIND_STRATEGY=LOCATION"
" {extraArguments}"
" ..",
"cd gafferBuild && make install -j {jobs} VERBOSE=1",
"cp {buildDir}/share/doc/OSL/osl-languagespec.pdf {buildDir}/doc",
Expand All @@ -46,6 +50,7 @@

"variables" : {

"extraArguments" : "",
"extraCommands" : "",
"useBatched" : "b8_AVX,b8_AVX2,b8_AVX2_noFMA,b8_AVX512,b8_AVX512_noFMA,b16_AVX512,b16_AVX512_noFMA",

Expand All @@ -65,6 +70,15 @@

],

"platform:linux" : {

"variables" : {

"extraArguments" : "-D OSL_USE_OPTIX=1",

},
},

"platform:macos" : {

"variables" : {
Expand Down

0 comments on commit 8ef4b2d

Please sign in to comment.