Skip to content

Use mipmaps and trilinear filtering for large, standalone textures. - #2408

Merged
bors-servo merged 1 commit into
servo:masterfrom
glennw:mipmaps
Feb 12, 2018
Merged

bors-servo merged 1 commit into
servo:masterfrom
glennw:mipmaps

Conversation

@glennw

@glennw glennw commented Feb 12, 2018 •

Copy link
Copy Markdown
Member

Images that are large (currently this means one dimension > 512) are
placed into standalone textures rather than allocated into the
shared texture cache pages. Enabling mipmaps and trilinear filtering
on this subset of images is very simple, and also fixes the majority
of images where lack of mipmaps are a noticeable quality issue.

In the future, we can expand this to support mipmaps within the
shared cache pages, if desired, by manually drawing the mips with
a shader and making use of the mip-bias parameter to disable mip
selection for shared cache regions without mips.

Fixes #2023.


This change is Reviewable

Images that are large (currently this means one dimension > 512) are
placed into standalone textures rather than allocated into the
shared texture cache pages. Enabling mipmaps and trilinear filtering
on this subset of images is very simple, and also fixes the majority
of images where lack of mipmaps are a noticeable quality issue.

In the future, we can expand this to support mipmaps within the
shared cache pages, if desired, by manually drawing the mips with
a shader and making use of the mip-bias parameter to disable mip
selection for shared cache regions without mips.

Fixes servo#2023.
@kvark

kvark commented Feb 12, 2018

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 19f43d9 has been approved by kvark

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 19f43d9 with merge eceed87...

bors-servo pushed a commit that referenced this pull request Feb 12, 2018
Use mipmaps and trilinear filtering for large, standalone textures.

Images that are large (currently this means one dimension > 512) are
placed into standalone textures rather than allocated into the
shared texture cache pages. Enabling mipmaps and trilinear filtering
on this subset of images is very simple, and also fixes the majority
of images where lack of mipmaps are a noticeable quality issue.

In the future, we can expand this to support mipmaps within the
shared cache pages, if desired, by manually drawing the mips with
a shader and making use of the mip-bias parameter to disable mip
selection for shared cache regions without mips.

Fixes #2023.

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

Copy link
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit 19f43d9 into servo:master Feb 12, 2018
@staktrace

Copy link
Copy Markdown
Contributor

@glennw this caused a couple of linux reftest regressions. One (dom/html/reftests/bug917595-exif-rotated.jpg) is probably fuzzable but the other (layout/reftests/bugs/364968-1.xul) is not. I verified that this PR was the source of the regression.
Try push at WR cset d5bf40389e54ee96fc7e313fbe1a590f1464b3a4 is green
Try push at WR cset eceed87325ef1dbbd220a4ccbb9e7860f2679428 has failures
Both try pushes are based on the same m-c revision so this PR is the only difference.

It looks like the try push you did earlier in this PR was testing these changes in isolation, so maybe it doesn't play well with something else that has landed in WR since the last WR update into gecko.

@glennw
glennw deleted the mipmaps branch February 13, 2018 00:35
@glennw

glennw commented Feb 13, 2018

Copy link
Copy Markdown
Member Author

@staktrace The xul failure should be fixed by #2409. I think we can fuzz the other failure.

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.

Heavily-downscaled images look bad

5 participants