Repository navigation
Only apply mip-maps if both image dimensions are > 512. - #2409
Merged
Merged
Conversation
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).
Member
Author
|
r? @staktrace (This should fix the test issue - just building it locally in Gecko to confirm). |
Member
Author
|
Confirmed that the test in question passes in gecko with this patch. |
Contributor
|
In this case, with a 1/128 x 1/2 scale, ideally you'd want horizontal mip mapping but no vertical mip mapping. |
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. |
Contributor
|
Try push with this PR looks good, the R3 failure is gone. I'll fuzz the R8. r+ from me, but I'm not qualified to actually review the code change. |
Member
Author
Contributor
|
@bors-servo r+ |
Contributor
|
📌 Commit 6763e44 has been approved by |
Contributor
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 -->
Contributor
|
☀️ Test successful - status-appveyor, status-taskcluster, status-travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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