Skip to content
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

[Merged by Bors] - Expose command encoders #3271

Closed
wants to merge 3 commits into from

Conversation

StarArawn
Copy link
Contributor

@StarArawn StarArawn commented Dec 7, 2021

Objective

I'm exposing these command encoders so bevy user's can create their own command encoders. This is useful when you want to copy a texture to a texture or create a compute pass manually for example.

Note: I formatted this file which might of changed the order of some exports.

Solution

Just re-export CommandEncoder and CommandEncoderDescriptor.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Dec 7, 2021
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Triage This issue needs to be labelled labels Dec 7, 2021
@jakobhellermann
Copy link
Contributor

Maybe we should reexport wgpu entirely? CommandEncoder isn't exactly a render_resource anymore.

rust-analyzer probably prioritizes bevy_render2::RenderPipelineDescriptor over bevy_render2::wgpu::RenderPipelineDescriptor in its auto import so that should be no problem.

@cart
Copy link
Member

cart commented Dec 8, 2021

Maybe we should reexport wgpu entirely?

Its worth considering. But I do like having full control over our namespace. We already alias a number of wgpu types with our own (Texture, Buffer, RenderPiplineDescriptor, etc). Exporting wgpu wholesale makes talking about these types more difficult and introduces new (and possibly confusing and hard to debug) error cases for users of ide tooling like rust-analyzer. For now, I'd prefer to be selective here. If we miss something, users always have the escape hatch of pulling in wgpu directly. We should just do a thorough pass over the types wgpu exports and add everything we (I) missed. From there gaps should be few and far between.

@cart
Copy link
Member

cart commented Dec 8, 2021

Definitely open to reconsidering how / where we export these types. wgpu just globs everything together at the root. bevy_render is a bit more organized, so we'll want to discuss ideal module names.

@cart
Copy link
Member

cart commented Dec 8, 2021

bors r+

@cart
Copy link
Member

cart commented Dec 8, 2021

(merging because this is useful now ... feel free to keep discussing)

bors bot pushed a commit that referenced this pull request Dec 8, 2021
# Objective
I'm exposing these command encoders so bevy user's can create their own command encoders. This is useful when you want to copy a texture to a texture or create a compute pass manually for example.

Note: I formatted this file which might of changed the order of some exports.

## Solution
Just re-export `CommandEncoder` and `CommandEncoderDescriptor`.
@bors bors bot changed the title Expose command encoders [Merged by Bors] - Expose command encoders Dec 8, 2021
@bors bors bot closed this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants