Closed Bug 1673387 Opened 4 years ago Closed 4 years ago

Stop using texture arrays in the texture cache

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- disabled
firefox85 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 2 obsolete files)

We have run into a number of driver bugs with texture arrays, especially on android. avoiding texture arrays will let us remove some slow paths and workarounds. In addition, in order to implement more advanced texture atlas packing strategies, it is better to allow larger regions than 512x512.

Texture arrays originally allowed us to have a simple resizable storage with 512x512 granularity (each layer), but we stopped resizing texture arrays because of performance issues on windows+intel, so their only advantage now for the texture cache is size granularity which we don't take advantage of either.

The patch ended up more complicated than I anticipated due to a lot of places in webrender assuming texture arrays unless specified otherwise.
The patch also merges TextureTarget into ImageBufferKind, and removes the realloc code path ing the texture cache (which is supposed to be dead code since because of performance issues on windows+intel).

Changing the size or number of layers of textures unfortunately usually leads to small sampling differences which requires fixing in the refetest references.

Blocks: 1645318
Blocks: 1650428
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e4cf743d6916 Don't use texture arrays for shared and standalone texture cache entries. r=gw https://hg.mozilla.org/integration/autoland/rev/a755e87bf875 Adjust reftest references. r=jnicol

The patch ended up more complicated than I anticipated due to a lot of places in webrender assuming texture arrays unless specified otherwise.
The patch also merges TextureTarget into ImageBufferKind, and removes the realloc code path ing the texture cache (which is supposed to be dead code since because of performance issues on windows+intel).

Changing the size or number of layers of textures unfortunately usually leads to small sampling differences which requires fixing in the refetest references.

Depends on D96816

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/591c4143921f Don't use texture arrays for shared and standalone texture cache entries. r=gw https://hg.mozilla.org/integration/autoland/rev/a315ba98577f Adjust reftest references. r=jnicol
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4edddc545827 Don't use texture arrays for shared and standalone texture cache entries. r=gw https://hg.mozilla.org/integration/autoland/rev/4e6e7829d164 Adjust reftest references. r=jnicol
Flags: needinfo?(nical.bugzilla)
Keywords: leave-open
Status: NEW → RESOLVED
Closed: 4 years ago
Keywords: leave-open
Resolution: --- → FIXED
Attachment #9187339 - Attachment is obsolete: true
Attachment #9187340 - Attachment is obsolete: true

Backed out from Beta for 84.0b4 for causing bug 1677696. It remains landed for 85+.
https://hg.mozilla.org/releases/mozilla-beta/rev/5ebdc746f3e8

Target Milestone: --- → 84 Branch
Regressions: 1679681
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: