Skip to content

Conversation

@Firestar99
Copy link
Member

@Firestar99 Firestar99 commented Jan 15, 2026

With ZST entry params, you can do some cursed generic entry point stuff to make certain inputs and outputs optional:

#[spirv(vertex)]
pub fn main<T: Copy>(in1: T, out1: &mut T) {
*out1 = in1;
}
pub fn dummy() {
main::<u32>(0, &mut 0);
main::<f32>(0., &mut 0.);
main::<()>((), &mut ());
}

@Firestar99 Firestar99 marked this pull request as ready for review January 15, 2026 09:27
@Ralith
Copy link

Ralith commented Jan 15, 2026

As a prospective user, I think having entry points appear as a side-effect of monomorphization is potentially very difficult to reason about. I'd rather just write out the entry points I want.

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.

3 participants