Skip to content

Commit

Permalink
Fix build for Cutrace (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelatihy authored Mar 1, 2022
1 parent 802c6e2 commit 0b83c3a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 19 deletions.
56 changes: 52 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "ON",
"YOCTO_DENOISE": "ON",
"YOCTO_OPENGL": "ON"
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "OFF"
},
"architecture": {
"value": "x64",
Expand All @@ -33,7 +34,8 @@
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "ON",
"YOCTO_DENOISE": "ON",
"YOCTO_OPENGL": "ON"
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "OFF"
},
"architecture": {
"value": "x64",
Expand All @@ -50,7 +52,8 @@
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "OFF",
"YOCTO_DENOISE": "OFF",
"YOCTO_OPENGL": "ON"
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "OFF"
},
"architecture": {
"value": "x64",
Expand All @@ -67,7 +70,44 @@
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "OFF",
"YOCTO_DENOISE": "OFF",
"YOCTO_OPENGL": "ON"
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "OFF"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "release-cuda",
"description": "Release build",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "OFF",
"YOCTO_DENOISE": "OFF",
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "ON"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "debug-cuda",
"description": "Debug build",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"YOCTO_APPS": "ON",
"YOCTO_EMBREE": "OFF",
"YOCTO_DENOISE": "OFF",
"YOCTO_OPENGL": "ON",
"YOCTO_CUDA": "ON"
},
"architecture": {
"value": "x64",
Expand All @@ -91,6 +131,14 @@
{
"name": "debug-nodep",
"configurePreset": "debug-nodep"
},
{
"name": "release-cuda",
"configurePreset": "release-cuda"
},
{
"name": "debug-cuda",
"configurePreset": "debug-cuda"
}
]
}
24 changes: 9 additions & 15 deletions libs/yocto/yocto_cutrace.cu
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
// ======================================================================== //
// Copyright 2018-2019 Ingo Wald //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// you may not use this file except in compliance with the License. //
// You may obtain a copy of the License at //
// //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
// Unless required by applicable law or agreed to in writing, software //
// distributed under the License is distributed on an "AS IS" BASIS, //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and //
// limitations under the License. //
// ======================================================================== //
//
// # Yocto/CuTrace: Path tracing on Cuda/Optix
//
// Yocto/CuTrace is a simple path tracer written on the Yocto/Scene model.
// Yocto/CuTrace is implemented in `yocto_cutrace.h`, `yocto_cutrace.cpp`,
// and `yocto_cutrace.cu`.
//
// THIS IS AN EXPERIMENTAL LIBRARY THAT IS NOT READY FOR PRIME TIME
//

#include <optix_device.h>
// do not flip it
Expand Down

0 comments on commit 0b83c3a

Please sign in to comment.