Closed Bug 1632276 Opened 5 years ago Closed 5 years ago

support uint indexes in SWGL DrawElements

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

To support the WR debug renderer and debug overlays in SWGL, we need to properly support supplying GL_UNSIGNED_INT-typed indexes to glDrawElements. The current hack just casts them directly to uint16, which can break if the indexes won't fit, plus has associated conversion cost to allocate an intermediate uint16 index array.

Since WR only ever supplies triangles in fixed index orders- 0,1,2 for triangle and 0,1,2,2,1,3 for quads - we can take advantage of this to not need to pass around index arrays. Instead, we can assume vertex attributes will always be supplied in those orders and just pass around the base index with offsets relative to that for successive vertexes.

Priority: -- → P3
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f0e442a51d2 support full-range unsigned int indexes in SWGL DrawElements. r=jimb
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: