Closed Bug 1635649 Opened 4 years ago Closed 4 years ago

Optimize texture(sampler2DArray) for same layer in SWGL. r?jrmuizel

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We never sample from different layers within a chunk, so we do an expensive multiply across all lanes to calculate the layer offset. In SSE2, 32-bit multiplies can only be done 2 per register (see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=3726,3928,3910,3910&text=mm_mul_ep). Could conceivably use an FP mul, but it's just much better to do a scalar multiply here... Shaves a few percent off our image brush-heavy profiles.

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a34f25d1dc8
optimize texture(sampler2DArray) for same layer in SWGL. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: