[Webkit-unassigned] [Bug 239116] New: webgl2 uniform buffer object size truely support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 12 01:01:36 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239116

            Bug ID: 239116
           Summary: webgl2 uniform buffer object size truely support
           Product: WebKit
           Version: Safari 15
          Hardware: iPhone / iPad
                OS: iOS 15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 544240302 at qq.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com

our web product's graphic rendering has upgrade from webgl1 to webgl2.
we follow the Browser compatibility that the safari on IOS version 15 is supported.
but when we finish the work,we found out some problem just on IOS,it is fine on all other platforms based on the Browser compatibility list.
After check and analysis we locate the problem at the Uniform Buffer Object Support.

through the gl.getParameter(GL.XXX) function we have checked many parameters support by the Safari and do not found any problems.
in order to support all devices,our program use the minimun value list in opengles.
when we test the safari,the value is down:
MAX_UNIFORM_BLOCK_SIZE = 16384kb
MAX_UNIFORM_BUFFER_BINDINGS = 24

when we define a uniform buffer object ,which size was 16384kb,it can not render any thing,and will cause webgl context lost event later!
then we reduce the ubo's size to 255*vec4=255*16=4080kb,it work fine.and we do not know why is this size.

    'layout(std140) uniform SubjectlBlock',
    '{',
    '   vec4 datas[255];',
    '}Subject;',

if the ubo's size is lower than 255*vec4,it works fine,but if bigger than 255*vec4,it wll not render any thing.
if the size is not so large,like 300*vec4,it will not log out any thing and no warning(the shader was compiled successfully),just can not see anything.

at first we use many UBOs, then we reduce the UBOs number to one for the test,in the process of this,we found that the total size is shared.
for example,when we have two UBOs,one is 32*vec4 kb,anther is 223*vec4 kb,that's also fine.but the total size can not exceed 255*vec4 kb,otherwise render nothing.



we assume that the webkit transfer UBOs to uniform vectors,so the size is limit by the MAX_VERTEX_UNIFORM_VECTORS and MAX_FRAGMENT_UNIFORM_VECTORS.
but it seems not so right,just a guess.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220412/66fdf0ba/attachment.htm>


More information about the webkit-unassigned mailing list