-
Notifications
You must be signed in to change notification settings - Fork 6
Storage/Uniform Buffer Any API rework #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chronicl
wants to merge
32
commits into
RayMarch:v2.0.0-beta.1
Choose a base branch
from
chronicl:dynamic_buffer3
base: v2.0.0-beta.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Storage/Uniform Buffer Any API rework
The goal of this PR is twofold
Anyapi for creating storage and uniform buffer bindings, mainly by making the surface of errors smaller.layoutable/align_size.rs.They go hand in hand: The
TypeLayoutrework makes creatingTypeLayouts less error prone and moves potential layout errors (mainly for uniform layout rules) outside of theAnyapi, so that a user of theAnyapi may respond to layout errors before encoding time.The PR is based on #19, which should be merged first. Decoupling it from #19 is not possible.
Changes
The main change is splitting
Any::bindinginto three methodsAny::storage_buffer_binding,Any::uniform_buffer_bindingandAny::handle_binding:Open questions
custom_min_alignandcustom_min_sizecan't be too small, because ofmin. Can this function be removed or is it supposed to exist?Arrayimplementations. I believe the entireBuffer(Ref)code could be massively cleaned up by removing the indirection throughGpuStore. I have ideas on how to do this, but I'd prefer to do it as a separate PR. Removing theGpuStoredependency ofBuffer(Ref)will allow for a lot of trait bound cleanup.This PR is functional, but needs cleanup. Not yet ready for review!