Skip to content

Commit

Permalink
fix for un-initialized compile options structs
Browse files Browse the repository at this point in the history
  • Loading branch information
ingowald committed Oct 21, 2020
1 parent a5a9051 commit 3ee6230
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)

project(optix7course)
project(optix7course VERSION 1.0.1)

cmake_minimum_required(VERSION 2.8)
if (NOT WIN32)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Latest Updates:

* 10/21/2020: Bugfix: all moduleCompileOptions and
pipelineCompileOptions are now properly zero-initialized by default.
Otherwise, variables not set in these struct might have invalid values.

* 8/3/2020: Updated to also compile on OptiX 7.1

* 1/3/2020: Several fixes and documentation adds to make project
Expand Down
6 changes: 3 additions & 3 deletions example02_pipelineAndRayGen/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example03_inGLFWindow/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example04_firstTriangleMesh/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example05_firstSBTData/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example06_multipleObjects/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example07_firstRealModel/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example08_addingTextures/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example09_shadowRays/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example10_softShadows/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example11_denoiseColorOnly/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down
6 changes: 3 additions & 3 deletions example12_denoiseSeparateChannels/SampleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ namespace osc {

/*! @{ the pipeline we're building */
OptixPipeline pipeline;
OptixPipelineCompileOptions pipelineCompileOptions;
OptixPipelineLinkOptions pipelineLinkOptions;
OptixPipelineCompileOptions pipelineCompileOptions = {};
OptixPipelineLinkOptions pipelineLinkOptions = {};
/*! @} */

/*! @{ the module that contains out device programs */
OptixModule module;
OptixModuleCompileOptions moduleCompileOptions;
OptixModuleCompileOptions moduleCompileOptions = {};
/* @} */

/*! vector of all our program(group)s, and the SBT built around
Expand Down

0 comments on commit 3ee6230

Please sign in to comment.