This repository was archived by the owner on Dec 1, 2025. It is now read-only.
simplify matrix vector multiplication#132
Open
Traxar wants to merge 37 commits intoGota7:shadercrossfrom
Open
Conversation
Gota7
reviewed
Sep 16, 2025
Traxar
commented
Sep 18, 2025
| c1: @Vector(4, f32), | ||
| c2: @Vector(4, f32), | ||
| c3: @Vector(4, f32), | ||
| const Mat4 = struct { |
Contributor
Author
There was a problem hiding this comment.
packedness is lost due to using an array, which does not guarantee memory layout. The sample still works (atleast for me). If packedness is of importance i will rewrite the changes both cpu and gpu side with the original struct fields and the simplified maths
Owner
There was a problem hiding this comment.
Hm now this is a good question. If we mark the struct as extern that conforms to the C ABI packing right? But is that consistent across platforms?
Contributor
Author
There was a problem hiding this comment.
i think the extern mark should work 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changes