Open
Bug 1509801
Opened 7 years ago
Updated 3 years ago
Weblg2 UBO reads zeros if buffer size exceeds MAX_UNIFORM_BLOCK_SIZE on Windows
Categories
(Core :: Graphics: CanvasWebGL, defect, P2)
Tracking
()
NEW
People
(Reporter: sergey.ext, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Steps to reproduce:
Open this page: https://sergeyext.github.io/sergeyext/webgl_ubo_bug.html
on a Windows 10 x64 machine with gl.MAX_UNIFORM_BLOCK_SIZE == 1024.
Actual results:
Only one colored square is visible.
Expected results:
Two similar squares should be visible.
The was tested to be reproducible on Windows 10 x64 with GeForce GTX 950M (driver 416.34), GeForce GTX 760 (driver 399.24), Intel HD Graphics 620.
Test page works as expected (showing two similar squares) on Linux desktops and Android devices. Probably, it's a bug in ANGLE.
Chrome is also affected: https://bugs.chromium.org/p/chromium/issues/detail?id=906683
The problem is in uniform binding. Test page allocates a uniform buffer, whose size is twice as maximum binding size. Then, if we bind the first part of the buffer:
gl.bindBufferRange(gl.UNIFORM_BUFFER, 0, ubo, 0, maxUboSize);
it works correctly. But if we bind the second part of the buffer (which is perfectly legal according to specs):
gl.bindBufferRange(gl.UNIFORM_BUFFER, 0, ubo, maxUboSize, maxUboSize);
the shader will read zeros from the buffer on Windows, but not on other platforms.
Comment 1•7 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
I've tested this report on Windows 10 x64 and Ubuntu 18.04 x64. Upon loading on Windows, only one square is displayed. When the same page is loaded on Linux two squares are displayed. I`m not sure what is the desired behavior here. Assigning component in order to involve the Eng team. Please change if this is not the right component.
Status: UNCONFIRMED → NEW
status-firefox63:
--- → affected
status-firefox64:
--- → affected
status-firefox65:
--- → affected
Component: Untriaged → Canvas: WebGL
Ever confirmed: true
Product: Firefox → Core
Updated•7 years ago
|
Flags: needinfo?(jgilbert)
Priority: -- → P3
Comment 2•6 years ago
|
||
Definite ANGLE bug. Works with native-gl on Windows.
Flags: needinfo?(jgilbert)
Comment 3•6 years ago
|
||
The Chromium bug mentions clamping the binding sent to the driver to MAX_UBO_SIZE, which is probably a good idea.
Priority: P3 → P2
Comment 4•6 years ago
|
||
We shouldn't need to do this. ANGLE should handle this gracefully. Maybe we just haven't updated enough yet.
This bug is already fixed in ANGLE:
https://bugs.chromium.org/p/chromium/issues/detail?id=906683
Please take the update. It's still reproducible in 76.0.1 on Windows 10 x64 with Nvidia.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•