Skip to content

Only apply mip-maps if both image dimensions are > 512. - #2409

Merged
bors-servo merged 1 commit into
servo:masterfrom
glennw:fix-mips
Feb 13, 2018
Merged

bors-servo merged 1 commit into
servo:masterfrom
glennw:fix-mips

Conversation

@glennw

@glennw glennw commented Feb 13, 2018 •

Copy link
Copy Markdown
Member

This is a hack / workaround for some test failures in gecko.

There are some test images with resolution 2048x32. These were
having mips enabled, but then failing reftests since the tests
were expecting bilinear filtering only. When these images were
being drawn with a size of 4x4 pixels, the smallest mip was
being selected, which is not what the test expects.

This workaround is a reasonable tradeoff for now - we get mip
mapping on large images, while allowing the existing tests to
pass.

In the future, we could consider some alternatives (such as a better
heuristic for enabling mips, or a different mip algorithm).


This change is Reviewable

This is a hack / workaround for some test failures in gecko.

There are some test images with resolution 2048x32. These were
having mips enabled, but then failing reftests since the tests
were expecting bilinear filtering only. When these images were
being drawn with a size of 4x4 pixels, the smallest mip was
being selected, which is not what the test expects.

This workaround is a reasonable tradeoff for now - we get mip
mapping on large images, while allowing the existing tests to
pass.

In the future, we could consider some alternatives (such as a better
heuristic for enabling mips, or a different mip algorithm).
@glennw

glennw commented Feb 13, 2018

Copy link
Copy Markdown
Member Author

r? @staktrace

(This should fix the test issue - just building it locally in Gecko to confirm).

@glennw

glennw commented Feb 13, 2018

Copy link
Copy Markdown
Member Author

Confirmed that the test in question passes in gecko with this patch.

@mstange

mstange commented Feb 13, 2018

Copy link
Copy Markdown
Contributor

In this case, with a 1/128 x 1/2 scale, ideally you'd want horizontal mip mapping but no vertical mip mapping.

@glennw

glennw commented Feb 13, 2018

Copy link
Copy Markdown
Member Author

@mstange Yup - the initial implementation just allows the driver to build the mips. We can certainly add manual mip creation in the future though.

@staktrace

Copy link
Copy Markdown
Contributor

Try push with this PR looks good, the R3 failure is gone. I'll fuzz the R8.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=2425a4a7e5f6ba268c41c5eee3eca310ce603d5a

r+ from me, but I'm not qualified to actually review the code change.

@glennw

glennw commented Feb 13, 2018

Copy link
Copy Markdown
Member Author

r? @kvark or @nical

@nical

nical commented Feb 13, 2018

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 6763e44 has been approved by nical

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6763e44 with merge ac8fb3f...

bors-servo pushed a commit that referenced this pull request Feb 13, 2018
Only apply mip-maps if both image dimensions are > 512.

This is a hack / workaround for some test failures in gecko.

There are some test images with resolution 2048x32. These were
having mips enabled, but then failing reftests since the tests
were expecting bilinear filtering only. When these images were
being drawn with a size of 4x4 pixels, the smallest mip was
being selected, which is not what the test expects.

This workaround is a reasonable tradeoff for now - we get mip
mapping on large images, while allowing the existing tests to
pass.

In the future, we could consider some alternatives (such as a better
heuristic for enabling mips, or a different mip algorithm).

<!-- 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/2409)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - status-appveyor, status-taskcluster, status-travis
Approved by: nical
Pushing ac8fb3f to master...

@bors-servo
bors-servo merged commit 6763e44 into servo:master Feb 13, 2018
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.

6 participants