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

Update render pass and framebuffers logic to the latest gfx-hal #1147

Merged
merged 3 commits into from
Jan 15, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented Jan 13, 2021

Connections
Updates gfx-hal with the latest major changes of gfx-rs/gfx#3571

Description
There is no need to track framebuffers at all any more! Since they don't contain images, we can keep them permanently.
There is no need to create and delete framebuffers for the swapchain either. Lots of non-trivial code is gone 🎉
The PR also removes one of the mutexes that the device holds.

Testing
Will be tested on wgpu-rs

Copy link
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

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

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 83 warnings, 0 errors.

@scoopr
Copy link
Contributor

scoopr commented Jan 14, 2021

Out of curiosity, tried this, and in my project I get part of the viewport cut off after resizing the window to "extreme-ish" aspect ratio. This doesn't happen with the examples. Correction: I had just botched the patches, it does happen with examples (except hello-triangle?).

I did a xcode frame cap, and when the view is cut off, I see there is a setScissorRect: call, that doesn't happen with "normal-ish" aspect ratio or master, and the resolution doesn't match what it sets the viewport to.

I wonder if it is the clamp_scissor in gfx-hal clamping to against wrong extent or something?

The behaviour seems to be if width is less than some fixed size, then height is cut to that fixed size, and vice versa, if height is less than some fixed size, width is cut at some fixed size.

@kvark
Copy link
Member Author

kvark commented Jan 14, 2021

Wow, @scoopr that's amazing feedback! I'll check it out.

@kvark
Copy link
Member Author

kvark commented Jan 15, 2021

Everything is fixed, and even better than before!
@cwfitzgerald and/or @grovesNL - please have a look. This is a bit of a complex change.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Minor nit, but otherwise LGTM!

Cargo.toml Show resolved Hide resolved
@kvark
Copy link
Member Author

kvark commented Jan 15, 2021

Thank you for reviewing!
bors r=cwfitzgerald

@bors
Copy link
Contributor

bors bot commented Jan 15, 2021

@bors bors bot merged commit 0491d00 into gfx-rs:master Jan 15, 2021
@kvark kvark deleted the gfx-update branch January 15, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants