-
Notifications
You must be signed in to change notification settings - Fork 293
Make the intermediate render targets select the correct size dynamically. #705
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
Conversation
r? @kvark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think we just need to make one change to it.
fn new(pass_index: isize, is_framebuffer: bool) -> RenderPass { | ||
fn new(pass_index: isize, | ||
is_framebuffer: bool, | ||
size: DeviceUintSize) -> RenderPass { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's store the size inside a RenderPass
in order to avoid asking for it in allocate_target
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed - had to change the code structure slightly to make this work, but it's much cleaner now.
// TODO(gw): Remove this hack once the tiling code is sorted out!! | ||
let max_dimension = cmp::max(screen_rect.size.width, screen_rect.size.height); | ||
let aligned_max_dimension = (max_dimension + SCREEN_TILE_SIZE - 1) & !(SCREEN_TILE_SIZE-1); | ||
let cache_size = DeviceUintSize::new(aligned_max_dimension as u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this code wasn't temporary, I'd ask for each of width/height to be rounded up separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was originally separate - it actually needs to be square to avoid the rounding glitch in OSMesa :|
@@ -3,7 +3,7 @@ | |||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
|
|||
#![cfg_attr(feature = "nightly", feature(nonzero))] | |||
#![cfg_attr(feature = "serde_derive", feature(proc_macro, rustc_attrs, structural_match))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this no longer needed for serde? I assume there is a compile warning at the moment then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
@kvark Thanks for the review - updated to address comments. I'll squash once you're happy with the changes. |
@glennw thanks! |
dynamically. The render targets need to be >= framebuffer size, to ensure they can allocate worst case render tasks.
@bors-servo r=kvark |
📌 Commit e5a3562 has been approved by |
Make the intermediate render targets select the correct size dynamically. The render targets need to be >= framebuffer size, to ensure they can allocate worst case render tasks. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/705) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
The render targets need to be >= framebuffer size, to ensure they
can allocate worst case render tasks.
This change is