Storage/Uniform Buffer Any API rework#21
Open
chronicl wants to merge 32 commits intoRayMarch:v2.0.0-beta.1from
Open
Storage/Uniform Buffer Any API rework#21chronicl wants to merge 32 commits intoRayMarch:v2.0.0-beta.1from
chronicl wants to merge 32 commits intoRayMarch:v2.0.0-beta.1from
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!