Skip to content

fix and refactor vulkan constant and storage buffer mapping#240

Merged
kaffeewolf merged 1 commit intogscept:masterfrom
DavidLokison:vulkan
Jan 28, 2025
Merged

fix and refactor vulkan constant and storage buffer mapping#240
kaffeewolf merged 1 commit intogscept:masterfrom
DavidLokison:vulkan

Conversation

@DavidLokison
Copy link
Contributor

No description provided.

@DavidLokison
Copy link
Contributor Author

Reasoning behind the refactoring part of the shader class was to get both constant and storage buffer calculations in a similar shape. I also noticed some consistencies in the other buffers as well, which was the baseline for the idea to add some functions for code that appears the same every time.

So I basically prepared such a change but didn't add too many functions at once now since that would require some more thought.

Also the usage of bindingLayout.binding and block->binding seemed to be somewhat arbitrary. Since they "should" point to the same value it shouldn't be an issue in the long run but I have set them all to block->binding to make it clear that this is indeed the same value.

Copy link
Contributor

@Duttenheim Duttenheim left a comment

Choose a reason for hiding this comment

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

Looks good, greatly simplified this mess! 👍

@DavidLokison
Copy link
Contributor Author

Have rebased the PR to the master as merging was reverting some changes I made which would duplicate some logic. It's good to merge in my opinion.

@kaffeewolf kaffeewolf merged commit f293204 into gscept:master Jan 28, 2025
4 checks passed
@DavidLokison DavidLokison deleted the vulkan branch January 28, 2025 23:28
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