Can't build `denoiser` example
Open
Nobody has claimed this yet.
bug
C-OptiX (Host)
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 249
- PR merge metrics
- No merged PRs in 30d
Description
I couldn't build denoiser example.
I had succeeded to build it in fd87b735ff8ff6168737f16e4facca but failed to current master branch
I used CUDA SDK 11.2.
PS C:\Users\hato2\Desktop\Rust-CUDA\examples\optix\denoiser> cargo build
Updating crates.io index
Compiling cust_derive v0.1.0 (C:\Users\hato2\Desktop\Rust-CUDA\crates\cust_derive)
Compiling optix v0.1.0 (C:\Users\hato2\Desktop\Rust-CUDA\crates\optix)
Compiling cust_core v0.1.0 (C:\Users\hato2\Desktop\Rust-CUDA\crates\cust_core)
Compiling cust v0.2.2 (C:\Users\hato2\Desktop\Rust-CUDA\crates\cust)
error[E0425]: cannot find value `OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_TRANSFORM` in module `sys`
--> crates\optix\src\acceleration.rs:1569:40
|
1569 | const DISABLE_TRANSFORM = sys::OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_TRANSFORM;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT`
|
::: C:\Users\hato2\Desktop\Rust-CUDA\target\debug\build\optix-715ab9f0db917c6b\out/optix_wrapper.rs:417:1
|
417 | pub const OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT: OptixInstanceFlags = 4;
| ---------------------------------------------------------------------------------------- similarly named constant `OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_ANYHIT` defined here
error[E0425]: cannot find value `OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO` in module `sys::OptixCompileDebugLevel`
--> crates\optix\src\pipeline.rs:162:45
|
162 | LineInfo = sys::OptixCompileDebugLevel::OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL`
|
::: C:\Users\hato2\Desktop\Rust-CUDA\target\debug\build\optix-715ab9f0db917c6b\out/optix_wrapper.rs:696:5
|
696 | pub const OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL: Type = 9041;
| --------------------------------------------------------- similarly named constant `OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL` defined here
error[E0063]: missing field `endcapFlags` in initializer of `OptixBuildInputCurveArray`
--> crates\optix\src\acceleration.rs:1094:58
|
1094 | curve_array: std::mem::ManuallyDrop::new(sys::OptixBuildInputCurveArray {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `endcapFlags`
error[E0560]: struct `OptixPipelineCompileOptions` has no field named `reserved`
--> crates\optix\src\pipeline.rs:296:21
|
296 | reserved: 0,
| ^^^^^^^^ `OptixPipelineCompileOptions` does not have this field
|
= note: available fields are: `usesMotionBlur`, `traversableGraphFlags`, `numPayloadValues`, `numAttributeValues`, `exceptionFlags` ... and 2 others
error[E0560]: struct `OptixPipelineCompileOptions` has no field named `reserved2`
--> crates\optix\src\pipeline.rs:297:21
|
297 | reserved2: 0,
| ^^^^^^^^^ `OptixPipelineCompileOptions` does not have this field
|
= note: available fields are: `usesMotionBlur`, `traversableGraphFlags`, `numPayloadValues`, `numAttributeValues`, `exceptionFlags` ... and 2 others
error[E0063]: missing fields `buildFlags` and `curveEndcapFlags` in initializer of `OptixBuiltinISOptions`
--> crates\optix\src\pipeline.rs:402:26
|
402 | let is_options = sys::OptixBuiltinISOptions {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `buildFlags` and `curveEndcapFlags`
error[E0560]: struct `OptixProgramGroupOptions` has no field named `reserved`
--> crates\optix\src\pipeline.rs:566:62
|
566 | let pg_options = sys::OptixProgramGroupOptions { reserved: 0 };
| ^^^^^^^^ `OptixProgramGroupOptions` does not have this field
|
= note: available fields are: `payloadType`
error[E0560]: struct `OptixProgramGroupOptions` has no field named `reserved`
--> crates\optix\src\pipeline.rs:612:62
|
612 | let pg_options = sys::OptixProgramGroupOptions { reserved: 0 };
| ^^^^^^^^ `OptixProgramGroupOptions` does not have this field
|
= note: available fields are: `payloadType`
error[E0063]: missing fields `numPayloadTypes` and `payloadTypes` in initializer of `OptixModuleCompileOptions`
--> crates\optix\src\pipeline.rs:184:17
|
184 | sys::OptixModuleCompileOptions {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `numPayloadTypes` and `payloadTypes`
Some errors have detailed explanations: E0063, E0425, E0560.
For more information about an error, try `rustc --explain E0063`.
error: could not compile `optix` due to 9 previous errors
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing cargo build in examples/optix/denoiser with CUDA SDK 11.2. Read the failing initializers and constants in crates/optix/src/acceleration.rs and crates/optix/src/pipeline.rs, then compare them with the generated optix_wrapper.rs fields shown in the errors. Done means the denoiser example builds without the reported nine errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100