diff --git a/src/pbrt/gpu/aggregate.cpp b/src/pbrt/gpu/aggregate.cpp index 92026d6af..0c6ee6ce3 100644 --- a/src/pbrt/gpu/aggregate.cpp +++ b/src/pbrt/gpu/aggregate.cpp @@ -1053,8 +1053,11 @@ OptixPipelineCompileOptions OptiXAggregate::getPipelineCompileOptions() { pipelineCompileOptions.numAttributeValues = 4; // OPTIX_EXCEPTION_FLAG_NONE; pipelineCompileOptions.exceptionFlags = - (OPTIX_EXCEPTION_FLAG_STACK_OVERFLOW | OPTIX_EXCEPTION_FLAG_TRACE_DEPTH | - OPTIX_EXCEPTION_FLAG_DEBUG); + (OPTIX_EXCEPTION_FLAG_STACK_OVERFLOW | OPTIX_EXCEPTION_FLAG_TRACE_DEPTH); +#if (OPTIX_VERSION < 80000) + // This flag is removed since OptiX 8.0.0 + pipelineCompileOptions.exceptionFlags |= OPTIX_EXCEPTION_FLAG_DEBUG; +#endif pipelineCompileOptions.pipelineLaunchParamsVariableName = "params"; return pipelineCompileOptions; diff --git a/src/pbrt/gpu/denoiser.cpp b/src/pbrt/gpu/denoiser.cpp index c593c207e..021d61d64 100644 --- a/src/pbrt/gpu/denoiser.cpp +++ b/src/pbrt/gpu/denoiser.cpp @@ -40,7 +40,9 @@ Denoiser::Denoiser(Vector2i resolution, bool haveAlbedoAndNormal) OPTIX_CHECK(optixDeviceContextCreate(cudaContext, 0, &optixContext)); OptixDenoiserOptions options = {}; -#if (OPTIX_VERSION >= 70300) +#if (OPTIX_VERSION >= 80000) + options.denoiseAlpha = OPTIX_DENOISER_ALPHA_MODE_COPY; +#elif (OPTIX_VERSION >= 70300) if (haveAlbedoAndNormal) options.guideAlbedo = options.guideNormal = 1; @@ -101,7 +103,9 @@ void Denoiser::Denoise(RGB *rgb, Normal3f *n, RGB *albedo, RGB *result) { CUdeviceptr(scratchBuffer), memorySizes.withoutOverlapScratchSizeInBytes)); OptixDenoiserParams params = {}; -#if (OPTIX_VERSION >= 70500) +#if (OPTIX_VERSION >= 80000) + // denoiseAlpha is moved to OptixDenoiserOptions in OptiX 8.0 +#elif (OPTIX_VERSION >= 70500) params.denoiseAlpha = OPTIX_DENOISER_ALPHA_MODE_COPY; #else params.denoiseAlpha = 0;