Closed Bug 1601060 Opened 5 years ago Closed 4 years ago

Failed to compile shader due to integer overflow

Categories

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

ARM
Android
defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- unaffected
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

On my Z3C running LineageOS 16 (Android 9), Adreno 330, OpenGL ES 3.0 V@140.0, when I attempt to enable WebRender, I get the following shader compilation error:

Failed to compile shader: brush_solid
Vertex shader compilation failed.
ERROR: 0:792: '0xffff0000' : Integer overflow
ERROR: 0:792: '0xffff0000' : Syntax error
2 compilation errors. No code generated.

Repeated for each of the shaders. It appears it doesn't like the high bit being set for a signed integer. It is easy enough to fix however if we just do >> 16 instead of the mask and adjust the shaders that check instance.flags appropriately.

Blocks: wr-android

Some OpenGL ES implementations do not like how we overflow a signed
32-bit integer when masking what are otherwise really unsigned 32-bit
integers. This patch avoids the problematic mask and instead just
does an equivalent shift.

Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/35d6558a2145
Fix shader compilation error on some Android devices. r=nical
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Does this need a Beta approval request?

Flags: needinfo?(aosmond)

I don't think so. We are only shipping WR on Android to the Pixel 2 and it seems to be fine.

Flags: needinfo?(aosmond)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: