Closed Bug 1686528 Opened 4 years ago Closed 4 years ago

PBO uploads on angle are truncated when UNPACK_ROW_LENGTH > width

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

Details

Attachments

(1 file)

This is easy to reproduce by changing optimal_pbo_stride from its default of 4 to something larger like 256. Then running wrench --angle reftest. It only affects wrench with --angle (which is what we use on CI). It does not affect firefox, as we do not use PBO uploads in firefox. I have encountered this when implementing bug 1685563, as switching to R8 textures causes us to hit this case with the default value of 4.

Lots of texture uploads will be truncated (missing rows at the bottom, probably with a partially uploaded row as the last one). It looks like the data is being truncated to width*height pixels rather than UNPACK_ROW_LENGTH*height. UNPACK_ROW_LENGTH otherwise works correctly: the pixels which are uploaded are in the correct locations.

I'll file an issue upstream. For now this is easy to workaround by setting optimal_pbo_stride to 1 on Angle.

ANGLE appears to truncate uploads from a PBO in cases where the
UNPACK_ROW_LENGTH is greater than the width of the upload. We
encounter this due to rounding up the stride of our data to be a
multiple of 4 bytes. Don't do that on ANGLE.

Note that we only hit this issue in wrench, as in Firefox we do not
use PBO uploads with ANGLE.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c17497926d86 Do not round up stride for PBO texture uploads on ANGLE.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

Heads up that this should now be fixed in upstream ANGLE: https://chromium.googlesource.com/angle/angle/+/9ab4707492972190a0e579ecc590252c534e0519

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: