Closed Bug 1624396 Opened 5 years ago Closed 5 years ago

Centralized shader features list for WebRender

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

We have a number of use-cases of WebRender (such as SWGL, ANGLE shader validation, Jamie's shader optimization work) that need a list of shaders compiled into WebRender and also what feature keys have been enabled on those shaders. Currently all these cases are maintaining their own independent lists which can easily break any time shaders or features are modified in WebRender.

After discussion with Glenn, we have decided one of the easiest ways to approach this is to make a centralized list in webrender_build. After initial experiments with a purely data list, combinatoric explosion makes this list both hard to generate and hard to maintain. It seems like the best way to go here is just to programmatically generate the list in a way not unlike the shaders themselves are, which keeps the code to generate the list both small and manageable.

To ensure the list stays up to date, WebRender with check when instantiating new lazily-compiled shaders whether they are in this list, even if the shader is not used, just to strictly enforce the list and give developers immediate feedback if they forget to update it.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/178ba8ef059c implement centralized shader features list management for WebRender. r=gw,jrmuizel,jnicol https://hg.mozilla.org/integration/autoland/rev/72cbbe719b5d update SWGL to use the centralized WR shader list. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/86954fd81261 add missing texture rectangle support to SWGL. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/a6414fe1b3ec add necessary trigonometry intrinsics for conic gradients in SWGL. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/86555508bdba update ANGLE shader validation tests to use centralized WR shader list. r=gw
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: