RESOLVED FIXED 255006
[WPE] Always call glBindAttribLocation before glLinkProgram
https://bugs.webkit.org/show_bug.cgi?id=255006
Summary [WPE] Always call glBindAttribLocation before glLinkProgram
Adrian Perez
Reported 2023-04-04 13:55:01 PDT
There are currently two places where we wrongly call glBindAttribLocation() after glLinkProgram(), which is wrong: - Tools/wpe/backends/fdo/WindowViewBackend.cpp:827 - Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:111 While this works by chance on most GL implementations (they seem to assign the locations in the same order as declared in shader sources), there is no guarantee about this--and actually the current code was reported to not work on an iMX8 Mini with the proprietary Vivante driver. The documentation tells that glLinkProgram() is what makes the bindings effective: “Attribute variable name-to-generic attribute index bindings for a program object can be explicitly assigned at any time by calling glBindAttribLocation. Attribute bindings do not go into effect until glLinkProgram is called.” -- https://docs.gl/es2/glBindAttribLocation This means we should be calling glLinkProgram() *after* glBindAttribLocation().
Attachments
Adrian Perez
Comment 1 2023-04-04 13:59:21 PDT
This bug, and the solution for it, was reported by user “mizmar” Thanks a lot! 👏️
Adrian Perez
Comment 2 2023-04-04 14:20:38 PDT
EWS
Comment 3 2023-04-04 14:40:57 PDT
Committed 262592@main (0b1da7fc6eb2): <https://commits.webkit.org/262592@main> Reviewed commits have been landed. Closing PR #12392 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.