[Webkit-unassigned] [Bug 225563] New: [WebGL2] compilation fixes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 8 14:22:19 PDT 2021


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

            Bug ID: 225563
           Summary: [WebGL2] compilation fixes
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mattst88 at gmail.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com

Created attachment 428092

  --> https://bugs.webkit.org/attachment.cgi?id=428092&action=review

patch

When compiling WebKit GTK on Linux with -DENABLE_WEBGL2=ON, I get compilation errors about primitiveRestartIndex:

/var/tmp/portage/net-libs/webkit-gtk-2.32.0/work/webkitgtk-2.32.0/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: In member function ‘void WebCore::WebGLRenderingContextBase::drawElements(GCGLenum, GCG
Lsizei, GCGLenum, long long int)’:
/var/tmp/portage/net-libs/webkit-gtk-2.32.0/work/webkitgtk-2.32.0/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:2647:20: error: ‘class WebCore::GraphicsContextGL’ has no member named ‘primitiveRestart
Index’
 2647 |         m_context->primitiveRestartIndex(getRestartIndex(type));
      |                    ^~~~~~~~~~~~~~~~~~~~~

Fixing that (in PATCH 2/4 in the attached patch series) lead to an undefined reference at linking:

lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/html/canvas/WebGLRenderingContextBase.cpp.o):WebGLRenderingContextBase.cpp:function WebCore::WebGLRenderingContextBase::drawElements(unsigned int, int, unsigned int, long long): error: undefined reference to 'WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex(unsigned int)'
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/html/canvas/WebGLRenderingContextBase.cpp.o):WebGLRenderingContextBase.cpp:function WebCore::WebGLRenderingContextBase::drawElementsInstanced(unsigned int, int, unsigned int, long long, int): error: undefined reference to 'WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex(unsigned int)'
collect2: error: ld returned 1 exit status

which I fixed by adding the function to the OpenGL shim code.

I noticed that the OPENGL_4 macro is also never defined and speculatively changed it to USE(OPENGL), which necessitated adding some other functions to the shim.

Never contributed to WebKit before. Probably did some stuff wrong. The attached patch is a git formatted patch against the github repo.

-- 
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/20210508/a5571d09/attachment-0001.htm>


More information about the webkit-unassigned mailing list