Skip to content

Conversation

Firestar99
Copy link
Member

@Firestar99 Firestar99 commented Sep 18, 2025

As discussed with @eddyb, we would like to versionize our spirv() macro so you can't accidentally combine two incompatible versions.

Also enables the addition of "stable spirv macros" that we can offer backward compat for. This will be used in #380 to allow glam to define it's VecN as rust-gpu vectors, for which it must refer to our "rustc tool" rust_gpu directly instead of going via our spirv() proc macro, which expands to our tool name.

@Firestar99

This comment was marked as outdated.

@Firestar99 Firestar99 changed the title rename tool from rust_gpu to rustc_codegen_spirv versionize rust_gpu tool to ensure codegen and spirv-std versions match Sep 22, 2025
// NOTE(shesp) Directly using `#[rust_gpu::spirv(...)]` because macro attributes are invalid in most contexts
// NOTE(shesp) Directly using `#[rust_gpu::spirv_v0_9(...)]` because macro attributes are invalid in most contexts

#[rust_gpu::spirv(
Copy link
Member Author

@Firestar99 Firestar99 Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is a problem. We can't replace every use with our spirv() proc macro, since some of these are in locations proc macros are illegal to place. Ideas?

@Firestar99
Copy link
Member Author

@eddyb this is ready for review, best commit by commit since the first one just moved a bunch of code.

Open Questions

  • tool name stays rust_gpu?
  • what to do with the test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant