rustracer icon indicating copy to clipboard operation
rustracer copied to clipboard

running on mac.

Open figo2264 opened this issue 1 year ago • 4 comments

error[E0432]: unresolved import `metal::CoreAnimationLayer`
  --> crates/libs/vulkan/src/utils/platforms.rs:19:5
   |
19 | use metal::CoreAnimationLayer;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `CoreAnimationLayer` in the root

error[E0405]: cannot find trait `EntryV1_0` in this scope
  --> crates/libs/vulkan/src/utils/platforms.rs:76:33
   |
76 | pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
   |                                 ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `InstanceV1_0` in this scope
  --> crates/libs/vulkan/src/utils/platforms.rs:76:47
   |
76 | pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0>(
   |                                               ^^^^^^^^^^^^ not found in this scope

warning: unused imports: `Entry`, `Instance`
 --> crates/libs/vulkan/src/utils/platforms.rs:2:11
  |
2 | use ash::{Entry, Instance};
  |           ^^^^^  ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Some errors have detailed explanations: E0405, E0432.
For more information about an error, try `rustc --explain E0405`.
warning: `vulkan` (lib) generated 1 warning
error: could not compile `vulkan` (lib) due to 3 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...

Somehow when I run cargo run or build, it failed to build with those messages.

figo2264 avatar Oct 18 '24 03:10 figo2264

I have never tested the code on Mac. Honestly I stole this piece of platform code from somewhere I don't remember. I should have deleted it. From the error message, it seems that pub unsafe fn create_surface<E: EntryV1_0, I: InstanceV1_0> should be renamed to match the imports.

However, even if this part of the code gets fixed, this project still won't work on Mac because it uses Nvidia extensions of Vulkan for GPU ray tracing. As in the README, the ideal platform of this project is Linux(or Windows) with a Nvidia RTX GPU.

KaminariOS avatar Oct 18 '24 03:10 KaminariOS

Thanks for the fast feedback. If it has been tested only on linux, can I do it WSL because i have another box at work which has RTX 3080 but it runs windows

figo2264 avatar Oct 18 '24 03:10 figo2264

WSL may work but it wont be easy.

Acutally Windows does work, see this: https://github.com/KaminariOS/rustracer/issues/9#issuecomment-1545267587.

He mentioned that he got it to work on Windows easily.

I never tested it myself because I don't use Windows.

KaminariOS avatar Oct 18 '24 03:10 KaminariOS

Thanks..I will test it

figo2264 avatar Oct 18 '24 04:10 figo2264