Skip to content

glam-infication of spirv-std - #395

Merged
Firestar99 merged 1 commit into
mainfrom
glam-ification
Sep 18, 2025
Merged

glam-infication of spirv-std#395
Firestar99 merged 1 commit into
mainfrom
glam-ification

Conversation

@Firestar99

@Firestar99Firestar99 commented Sep 17, 2025

Copy link
Copy Markdown
Member

Requires #394 (due to conflicts)

see #393

How are people feeling on replacing all the trivialimpl Vector<f32, 4> with a plain glam::Vec4?

pro:

  • clearer to read
  • functions returning V: Vector don't need any explicit declarations that it's a Vec2, in case of ambiguity:
    pubfnu16x2_to_vec2_unorm<V:Vector<f32,2>>(int:u32) -> V{

contra:

  • Both Vec3 and Vec3A impl Vector<f32, 3>, so you can't use them interchangeably anymore. We expect most people to use Vec3, and conversion is a trivial From::from.

Cases where we are generic on the vector element type, or element count, or both should remain as generic, eg:

pubfnsubgroup_broadcast_first<T:VectorOrScalar>(value:T) -> T{

closes#393

Base automatically changed from safe-intrinsics to mainSeptember 17, 2025 16:13

@schellschell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great!

@Firestar99
Firestar99 added this pull request to the merge queueSep 18, 2025
Merged via the queue into main with commit ca2ea7bSep 18, 2025
13 checks passed
@Firestar99
Firestar99 deleted the glam-ification branch September 18, 2025 08:36
Sign up for freeto 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.

RFC: glam-ification of spirv-std

2 participants

@Firestar99@schell