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

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

Merged
merged 1 commit into from Feb 13, 2018

Conversation

@glennw
Copy link
Member

glennw commented Feb 13, 2018

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
Copy link
Member Author

glennw commented Feb 13, 2018

r? @staktrace

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

@glennw
Copy link
Member Author

glennw commented Feb 13, 2018

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

@mstange
Copy link
Contributor

mstange commented Feb 13, 2018

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

@glennw
Copy link
Member Author

glennw commented Feb 13, 2018

@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
Contributor

staktrace commented Feb 13, 2018

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
Copy link
Member Author

glennw commented Feb 13, 2018

r? @kvark or @nical

@nical
Copy link
Collaborator

nical commented Feb 13, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2018

📌 Commit 6763e44 has been approved by nical

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2018

Testing commit 6763e44 with merge ac8fb3f...

bors-servo added 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
Contributor

bors-servo commented Feb 13, 2018

☀️ 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
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.