-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Revisit "gpu resource" naming #24
Comments
I just made the following changes:
The RenderResources container type still needs a new name. |
Removed the RenderResources container type. I think we're in a much better spot now, so I'm closing this |
superdump
referenced
this issue
in superdump/bevy
Jul 17, 2021
cart
pushed a commit
that referenced
this issue
Jul 24, 2021
cart
pushed a commit
that referenced
this issue
Jul 24, 2021
pcwalton
pushed a commit
to pcwalton/bevy
that referenced
this issue
Aug 30, 2021
Update Bevy to 0.3
atlv24
pushed a commit
to atlv24/bevy
that referenced
this issue
Feb 25, 2024
Improve shadows and docs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now the naming used for "gpu resource" concepts is confusing and sometimes conflicting:
RenderResourceId
s uniquely identifiable via a hash of the containedRenderResourceId
s. these eventually get turned into awgpu::BindGroup
by the wgpuRenderResourceContext
RenderResourceId
s. It also contains named vertex buffer / index buffer assignments. Used alongside pipeline layouts to generateRenderResourceSets
. TheRenderResourceSets
are cached and are only re-generated when a RenderResourceAssignment is changed.RenderResourceId
)render_resource::RenderResource
trait impls indexed by their string namesRenderResourceId
s.RenderResourceContext
render_resource::RenderResources
Some thoughts:
RenderResourceId
type, it could be broken up intoBufferId
,TextureId
,SamplerId
, etc. This gives additional type safety by default. When they need to be conceptually grouped (ex: bindings), a wrapper type can be used.RenderResourceAssignments
toUniformAssignments
or justUniforms
. If that happens it probably makes sense to move vertex buffer assignments to a different type. The same argument applies torender_resource:RenderResource
andrender_resource::RenderResources
.render_resource_context::RenderResourceContext
/render_resource_context::RenderResources
distinction is confusing. RenderResources is just a wrapper over the Box-ed RenderResourceContext. Maybe its better to just insert theBox<dyn RenderResourceContext>
directly into legion's resource collection. Accessing resources the resource by its type wouldnt be as clean, but it would remove another type that people need to worry about.In general the goal here should be to improve clarity and remove as much "invented jargon" as possible. Types should be self-describing.
The text was updated successfully, but these errors were encountered: