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] - Run a clear pass on Windows without any Views #3304

Closed
wants to merge 1 commit into from

Conversation

cart
Copy link
Member

@cart cart commented Dec 12, 2021

Fixes #3043

surface_texture.present() will cause panics if no work is done on a given frame. "Views" are how we queue up work. Without any cameras, no work is produced. This adds a "clear pass" for windows without views, which ensures we clear windows (thus doing work) every frame.

This is a "quick fix". It can be made much cleaner once we make "render targets" a concept and move some responsibilities around. Then we just clear the "render target" once instead of clearing "views". I might have time to tackle that work prior to 0.6, but I doubt it. If "render targets" don't make it in to 0.6, they will be one of the first things I tackle after release.

@cart cart added the A-Rendering Drawing game state to the screen label Dec 12, 2021
@cart cart added this to the Bevy 0.6 milestone Dec 12, 2021
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Dec 12, 2021
@cart cart removed the S-Needs-Triage This issue needs to be labelled label Dec 12, 2021
Copy link
Contributor

@Davier Davier left a comment

Choose a reason for hiding this comment

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

Works for me

@cart
Copy link
Member Author

cart commented Dec 12, 2021

bors r+

bors bot pushed a commit that referenced this pull request Dec 12, 2021
Fixes #3043 

`surface_texture.present()` will cause panics if no work is done on a given frame. "Views" are how we queue up work. Without any cameras, no work is produced. This adds a "clear pass" for windows without views, which ensures we clear windows (thus doing work) every frame.

This is a "quick fix". It can be made much cleaner once we make "render targets" a concept and move some responsibilities around. Then we just clear the "render target" once instead of clearing "views". I _might_ have time to tackle that work prior to 0.6, but I doubt it. If "render targets" don't make it in to 0.6, they will be one of the first things I tackle after release.
@bors bors bot changed the title Run a clear pass on Windows without any Views [Merged by Bors] - Run a clear pass on Windows without any Views Dec 12, 2021
@bors bors bot closed this Dec 12, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipelined Rendering: App crashes when there is no camera
2 participants